Closed ifyour closed 7 months ago
Based on the feedback from this issue, it's working fine for me, but I'm a little confused as to whether this is unintended behavior of the plugin. Note here that a global installation of sqlite3
may be required.
cd projects/blog
mkdir -p .mf/d1/DB
sqlite3 .mf/d1/DB/db.sqlite < blog.sql
Then run npm run dev
and it works fine. Or is there a better way to initialize the table structure to local SQLite? 🤣
Based on the feedback from this issue, it's working fine for me, but I'm a little confused as to whether this is unintended behavior of the plugin.
mkdir -p .mf/d1/DB sqlite3 .mf/d1/DB/db.sqlite < blog.sql
Then run
npm run dev
and it works fine. Or is there a better way to initialize the table structure to local SQLite? 🤣
Its still not working
POST /articles/create
GET /articles/create
POST /articles/preview
GET /articles/:id
GET /
GET /*
D1_ERROR: no such table: articles
@ongnxco Are you executing the path correctly? I tested that it is working.
npm i sqlite3 -g
cd projects/blog
mkdir -p .mf/d1/DB
sqlite3 .mf/d1/DB/db.sqlite < blog.sql
It would be nice if it was automatic like this https://hub.nuxt.com/docs/recipes/drizzle#migrations
In the
blog
example, when I runnpm run dev
, I get the following error on the console:D1_ERROR: no such table: articles
May I ask if there are any steps that I have erred in this example? It looks like I'm not synchronizing the table structure to local SQLite.