Migration Error using Expo SQLite

I'm getting this error when I try to run migrations:
DrizzleError: Failed to run the query 'CREATE TABLE `offline_entries_table` (
`id` text PRIMARY KEY NOT NULL,
`status` text DEFAULT 'UNSYNCED' NOT NULL,
`user_id` text(36) NOT NULL,
`base64` text,
`lat` real,
`lng` real,
`is_on_hold_time` integer,
`date` text NOT NULL,
`timezone_offset` integer NOT NULL,
`device` text NOT NULL,
`reason` text DEFAULT 'Not inform.',
`sync_error_message` text,
`updated_at` text,
`created_at` text DEFAULT (current_timestamp) NOT NULL
);
DrizzleError: Failed to run the query 'CREATE TABLE `offline_entries_table` (
`id` text PRIMARY KEY NOT NULL,
`status` text DEFAULT 'UNSYNCED' NOT NULL,
`user_id` text(36) NOT NULL,
`base64` text,
`lat` real,
`lng` real,
`is_on_hold_time` integer,
`date` text NOT NULL,
`timezone_offset` integer NOT NULL,
`device` text NOT NULL,
`reason` text DEFAULT 'Not inform.',
`sync_error_message` text,
`updated_at` text,
`created_at` text DEFAULT (current_timestamp) NOT NULL
);
And this is all, it doesn't gives me the error reason. This app is in development, so I changed this table a lot over the time and I always deleted the migrations, generated a single migration with the latests changes and re-builded my app. It's my first time using an ORM and to be honest I don't have much sense of using SQL, so probably I'm doing something wrong, but I can't find why.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?