bluesky-social / atproto

Social networking technology created by Bluesky
Other
7.49k stars 536 forks source link

`make run-dev-env` is failed by sqlite syntax error #1523

Closed KingYoSun closed 1 year ago

KingYoSun commented 1 year ago

Exec make run-dev-env, then it is failed by sqlite syntax error.

[ created by Bluesky ]

/home/kingyosun/atproto/node_modules/better-sqlite3/lib/methods/wrappers.js:5
        return this[cppdb].prepare(sql, this, false);
                           ^
SqliteError: near "include": syntax error
    at Database.prepare (/home/kingyosun/atproto/node_modules/better-sqlite3/lib/methods/wrappers.js:5:21)
    at SqliteConnection.executeQuery (/home/kingyosun/atproto/packages/dev-env/dist/bin.js:241985:27)
    at /home/kingyosun/atproto/packages/dev-env/dist/bin.js:237602:39
    at #run (/home/kingyosun/atproto/packages/dev-env/dist/bin.js:240554:18)
    at SingleConnectionProvider.provideConnection (/home/kingyosun/atproto/packages/dev-env/dist/bin.js:240545:30)
    at DefaultQueryExecutor.provideConnection (/home/kingyosun/atproto/packages/dev-env/dist/bin.js:240415:37)
    at DefaultQueryExecutor.executeQuery (/home/kingyosun/atproto/packages/dev-env/dist/bin.js:237601:23)
    at RawBuilder.execute (/home/kingyosun/atproto/packages/dev-env/dist/bin.js:237683:21)
    at Object.up61 (/home/kingyosun/atproto/packages/dev-env/dist/bin.js:268678:96)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 'SQLITE_ERROR'
}

Is is probably caused by this line. create index ... include can't exec by sqlite.

https://github.com/bluesky-social/atproto/blob/895a21fc25be29c6bd5e84281878e18808b68859/packages/pds/src/db/migrations/20230824T182048120Z-remove-post-hierarchy.ts#L7

little-buddy commented 1 year ago

same issue.

little-buddy commented 1 year ago

Just delete this line. Depending on the context, up means clean and down means create, so it should be an accident that this line appears here.