I have a SQLite3 database. I made a data dump that 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 am trying to accomplish this in PostgreSQL PgAdmin III, which gives me a lot of errors, ranging from PRAGMA, to “unsigned” fields, to datetime fields to 1 instead of true and 0 instead of false.
Is there any way to convert this script?
I thought about exporting each table to CSV and then importing them into PGDB, but I have so many tables, this is not an option.
source
share