I have a SQLite3 database. I did a data dump which looks something like this:
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE "admin_tools_menu_bookmark" (
"id" integer NOT NULL PRIMARY KEY,
"user_id" integer NOT NULL,
"url" varchar(255) NOT NULL,
"title" varchar(255) NOT NULL
);
INSERT INTO "admin_tools_menu_bookmark" VALUES(1,2,'/admin/recipes/recipe/','Recipe Management');
INSERT INTO "admin_tools_menu_bookmark" VALUES(2,2,'/admin/recipes/ingredient/','Ingredient Management');
CREATE TABLE "admin_tools_dashboard_preferences" (
"id" integer NOT NULL PRIMARY KEY,
"user_id" integer NOT NULL,
"data" text NOT NULL
);
......
I'm trying to execute this in PostgreSQL PgAdmin III, which gives me many many errors starting with PRAGMA
, to 'unsigned' fields to datetime fields to 1 instead of true and 0 instead of false.
Is there a proper way to convert this script?
I thought of exporting each table to CSV then importing them into a PGDB but I have so many tables this isn't an option.