Directus: SQLite Initialization/Migration Fails

Created on 30 Oct 2020  ·  5Comments  ·  Source: directus/directus

Trying to upgrade a SQLite database fails with the error message "Method implemented in the dialect driver". It seems like dropForeign() is not implemented for the SQLite driver.
As the migrations are run when initializing a database this error shows up, even though the initialization works.

API Bug SQLite

Most helpful comment

Is there a workaround for this? I'd like to try out directus using sqlite and can't get past the npx create-directus-project step. Thanks.

All 5 comments

Lets see if we can land support for dropForeign in Knex ᕕ( ᐛ )ᕗ

Is there a workaround for this? I'd like to try out directus using sqlite and can't get past the npx create-directus-project step. Thanks.

Installing with SQLite doesn't work on Ubuntu 18 and Windows 10:

root@box:~# npx create-directus-project test
npx: installed 54 in 4.965s
? Choose your database client SQLite (Beta)
? Database File Path: /root/test/data.db

Something went wrong while seeding the database:

[Error] Sqlite does not support alter column.

Please try again

? Database File Path: /root/test/data.db

Something went wrong while seeding the database:

[Error] Database is already installed

Please try again

? Database File Path: /root/test/data.db

Something went wrong while seeding the database:

[Error] Database is already installed

Please try again

? Database File Path: /root/test/data.db

Something went wrong while seeding the database:

[Error] Database is already installed

Please try again

? Database File Path: /root/test/data.db

Something went wrong while seeding the database:

[Error] Database is already installed

Please try again

Couldn't seed the database. Exiting.
(node:17991) UnhandledPromiseRejectionWarning: Error: Command failed with exit code 1: npx directus init
    at makeError (/root/.npm/_npx/17991/lib/node_modules/create-directus-project/node_modules/execa/lib/error.js:59:11)
    at handlePromise (/root/.npm/_npx/17991/lib/node_modules/create-directus-project/node_modules/execa/index.js:114:26)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Command.create (/root/.npm/_npx/17991/lib/node_modules/create-directus-project/lib/index.js:73:2)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:17991) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:17991) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Was this page helpful?
0 / 5 - 0 ratings

Related issues

andriusign picture andriusign  ·  3Comments

rijkvanzanten picture rijkvanzanten  ·  3Comments

benhaynes picture benhaynes  ·  4Comments

adamkobor picture adamkobor  ·  3Comments

pvshum picture pvshum  ·  4Comments