15 lines
498 B
SQL
15 lines
498 B
SQL
BEGIN TRANSACTION;
|
|
CREATE TABLE IF NOT EXISTS "sites-new" (
|
|
"id" INTEGER NOT NULL UNIQUE,
|
|
"username" TEXT NOT NULL,
|
|
"site_dir" TEXT NOT NULL,
|
|
"domain" TEXT NOT NULL UNIQUE,
|
|
"domain_type" TEXT NOT NULL,
|
|
"protocol" TEXT NOT NULL,
|
|
"creation_date" INTEGER NOT NULL,
|
|
PRIMARY KEY("id" AUTOINCREMENT)
|
|
);
|
|
INSERT INTO "sites-new" SELECT "id","username","site_dir","domain","domain_type","protocol","creation_date" FROM "sites";
|
|
DROP TABLE "sites";
|
|
ALTER TABLE "sites-new" RENAME TO "sites";
|
|
COMMIT;
|