···11811181 return err
11821182 })
1183118311841184+ orm.RunMigration(conn, logger, "remove-profile-stats-column-constraint", func(tx *sql.Tx) error {
11851185+ _, err := tx.Exec(`
11861186+ -- create new table without the check constraint
11871187+ create table profile_stats_new (
11881188+ id integer primary key autoincrement,
11891189+ did text not null,
11901190+ kind text not null, -- no constraint this time
11911191+ foreign key (did) references profile(did) on delete cascade
11921192+ );
11931193+11941194+ -- copy data from old table
11951195+ insert into profile_stats_new (id, did, kind)
11961196+ select id, did, kind
11971197+ from profile_stats;
11981198+11991199+ -- drop old table
12001200+ drop table profile_stats;
12011201+12021202+ -- rename new table
12031203+ alter table profile_stats_new rename to profile_stats;
12041204+ `)
12051205+ return err
12061206+ })
12071207+11841208 return &DB{
11851209 db,
11861210 logger,
+7
appview/db/profile.go
···450450 case models.VanityStatRepositoryCount:
451451 query = `select count(id) from repos where did = ?`
452452 args = append(args, did)
453453+ case models.VanityStatStarCount:
454454+ query = `select count(id) from stars where subject_at like 'at://' || ? || '%'`
455455+ args = append(args, did)
456456+ case models.VanityStatNone:
457457+ return 0, nil
458458+ default:
459459+ return 0, fmt.Errorf("invalid vanity stat kind: %s", stat)
453460 }
454461455462 var result uint64
+1-1
appview/ingester.go
···317317 var stats [2]models.VanityStat
318318 for i, s := range record.Stats {
319319 if i < 2 {
320320- stats[i].Kind = models.VanityStatKind(s)
320320+ stats[i].Kind = models.ParseVanityStatKind(s)
321321 }
322322 }
323323
···502502Note that you should add a newline at the end if setting a non-empty message
503503since the knot won't do this for you.
504504505505+## Troubleshooting
506506+507507+If you run your own knot, you may run into some of these
508508+common issues. You can always join the
509509+[IRC](https://web.libera.chat/#tangled) or
510510+[Discord](https://chat.tangled.org/) if this section does
511511+not help.
512512+513513+### Unable to push
514514+515515+If you are unable to push to your knot or repository:
516516+517517+1. First, ensure that you have added your SSH public key to
518518+ your account
519519+2. Check to see that your knot has synced the key by running
520520+ `knot keys`
521521+3. Check to see if git is supplying the correct private key
522522+ when pushing: `GIT_SSH_COMMAND="ssh -v" git push ...`
523523+4. Check to see if `sshd` on the knot is rejecting the push
524524+ for some reason: `journalctl -xeu ssh` (or `sshd`,
525525+ depending on your machine). These logs are unavailable if
526526+ using docker.
527527+5. Check to see if the knot itself is rejecting the push,
528528+ depending on your setup, the logs might be in one of the
529529+ following paths:
530530+ * `/tmp/knotguard.log`
531531+ * `/home/git/log`
532532+ * `/home/git/guard.log`
533533+505534# Spindles
506535507536## Pipelines
···15611590Refer to the [jujutsu
15621591documentation](https://jj-vcs.github.io/jj/latest/config/#commit-trailers)
15631592for more information.
15931593+15941594+# Troubleshooting guide
15951595+15961596+## Login issues
15971597+15981598+Owing to the distributed nature of OAuth on AT Protocol, you
15991599+may run into issues with logging in. If you run a
16001600+self-hosted PDS:
16011601+16021602+- You may need to ensure that your PDS is timesynced using
16031603+ NTP:
16041604+ * Enable the `ntpd` service
16051605+ * Run `ntpd -qg` to synchronize your clock
16061606+- You may need to increase the default request timeout:
16071607+ `NODE_OPTIONS="--network-family-autoselection-attempt-timeout=500"`
16081608+16091609+## Empty punchcard
16101610+16111611+For Tangled to register commits that you make across the
16121612+network, you need to setup one of following:
16131613+16141614+- The committer email should be a verified email associated
16151615+ to your account. You can add and verify emails on the
16161616+ settings page.
16171617+- Or, the committer email should be set to your account's
16181618+ DID: `git config user.email "did:plc:foobar". You can find
16191619+ your account's DID on the settings page
16201620+16211621+## Commit is not marked as verified
16221622+16231623+Presently, Tangled only supports SSH commit signatures.
16241624+16251625+To sign commits using an SSH key with git:
16261626+16271627+```
16281628+git config --global gpg.format ssh
16291629+git config --global user.signingkey ~/.ssh/tangled-key
16301630+```
16311631+16321632+To sign commits using an SSH key with jj, add this to your
16331633+config:
16341634+16351635+```
16361636+[signing]
16371637+behavior = "own"
16381638+backend = "ssh"
16391639+key = "~/.ssh/tangled-key"
16401640+```
16411641+16421642+## Self-hosted knot issues
16431643+16441644+If you need help troubleshooting a self-hosted knot, check
16451645+out the [knot troubleshooting
16461646+guide](/knot-self-hosting-guide.html#troubleshooting).