Error with Expo Sqlite + Drizzle
So i try to use Drizzle with expo
everything are set but i got an error
Any idea what the error with this? not sure i follow everything but still getting this error
[Error: undefined Unable to resolve module ./0000_crazy_prodigy.sql from /Users/x/todo-expo-drizzle/drizzle/migrations.js:
None of these files exist:
* drizzle/0000_crazy_prodigy.sql(.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.mjs|.native.mjs|.mjs|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.cjs|.native.cjs|.cjs|.ios.scss|.native.scss|.scss|.ios.sass|.native.sass|.sass|.ios.css|.native.css|.css)
* drizzle/0000_crazy_prodigy.sql
2 |
3 | import journal from './meta/_journal.json';
> 4 | import m0000 from './0000_crazy_prodigy.sql';
| ^
5 |
6 | export default {
7 | journal,]
[Error: undefined Unable to resolve module ./0000_crazy_prodigy.sql from /Users/x/todo-expo-drizzle/drizzle/migrations.js:
None of these files exist:
* drizzle/0000_crazy_prodigy.sql(.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.mjs|.native.mjs|.mjs|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.cjs|.native.cjs|.cjs|.ios.scss|.native.scss|.scss|.ios.sass|.native.sass|.sass|.ios.css|.native.css|.css)
* drizzle/0000_crazy_prodigy.sql
2 |
3 | import journal from './meta/_journal.json';
> 4 | import m0000 from './0000_crazy_prodigy.sql';
| ^
5 |
6 | export default {
7 | journal,]
1 Reply
ops looks like i need to add the metro config and babel but still having experience an error
based on logger
now i got this error
Any idea?
SyntaxError: .../drizzle/0000_crazy_prodigy.sql: Missing semicolon. (1:6)
> 1 | CREATE TABLE `plan` (
| ^
2 | `id` text PRIMARY KEY NOT NULL,
3 | `type` text NOT NULL,
4 | `title` text NOT NULL,
SyntaxError: .../drizzle/0000_crazy_prodigy.sql: Missing semicolon. (1:6)
> 1 | CREATE TABLE `plan` (
| ^
2 | `id` text PRIMARY KEY NOT NULL,
3 | `type` text NOT NULL,
4 | `title` text NOT NULL,
Query:
CREATE TABLE IF NOT EXISTS "__drizzle_migrations" (
id SERIAL PRIMARY KEY,
hash text NOT NULL,
created_at numeric
)
(NOBRIDGE) LOG Query: SELECT id, hash, created_at FROM "__drizzle_migrations" ORDER BY created_at DESC LIMIT 1
(NOBRIDGE) LOG Query: BEGIN
(NOBRIDGE) LOG Query: ROLLBACK
Query:
CREATE TABLE IF NOT EXISTS "__drizzle_migrations" (
id SERIAL PRIMARY KEY,
hash text NOT NULL,
created_at numeric
)
(NOBRIDGE) LOG Query: SELECT id, hash, created_at FROM "__drizzle_migrations" ORDER BY created_at DESC LIMIT 1
(NOBRIDGE) LOG Query: BEGIN
(NOBRIDGE) LOG Query: ROLLBACK
Failed to run the query 'CREATE TABLE `plan` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`type` text NOT NULL,
`title` text NOT NULL,
`description` text,
`category` text DEFAULT 'general' NOT NULL,
`icon` text,
`estimated_pomodoro` integer DEFAULT 1,
`completed_pomodoro` integer DEFAULT 0,
`priority` text DEFAULT 'normal',
`recurrence` text,
`deadline` text,
`created_at` text DEFAULT strftime('%Y-%m-%dT%H:%M:%fZ', 'now') NOT NULL,
`updated_at` text
);
'
Failed to run the query 'CREATE TABLE `plan` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`type` text NOT NULL,
`title` text NOT NULL,
`description` text,
`category` text DEFAULT 'general' NOT NULL,
`icon` text,
`estimated_pomodoro` integer DEFAULT 1,
`completed_pomodoro` integer DEFAULT 0,
`priority` text DEFAULT 'normal',
`recurrence` text,
`deadline` text,
`created_at` text DEFAULT strftime('%Y-%m-%dT%H:%M:%fZ', 'now') NOT NULL,
`updated_at` text
);
'