|
|
@ -8,7 +8,7 @@ cursor = connection.cursor()
|
|
|
|
|
|
|
|
|
|
|
|
# What script performs:
|
|
|
|
# What script performs:
|
|
|
|
# - first, remove site table: crash here if table doesn't exist (compatibility test without effort)
|
|
|
|
# - first, remove site table: crash here if table doesn't exist (compatibility test without effort)
|
|
|
|
# - remove site_id colum from comment table
|
|
|
|
# - remove site_id column from comment table
|
|
|
|
script = """
|
|
|
|
script = """
|
|
|
|
PRAGMA foreign_keys = OFF;
|
|
|
|
PRAGMA foreign_keys = OFF;
|
|
|
|
BEGIN TRANSACTION;
|
|
|
|
BEGIN TRANSACTION;
|
|
|
@ -25,8 +25,10 @@ CREATE TABLE comment (
|
|
|
|
author_gravatar varchar(255),
|
|
|
|
author_gravatar varchar(255),
|
|
|
|
content TEXT NOT NULL
|
|
|
|
content TEXT NOT NULL
|
|
|
|
);
|
|
|
|
);
|
|
|
|
INSERT INTO comment (id, url, notified, created, published, author_name, author_site, author_gravatar, content)
|
|
|
|
INSERT INTO comment (id, url, notified, created, published,
|
|
|
|
SELECT id, url, notified, created, published, author_name, author_site, author_gravatar, content
|
|
|
|
author_name, author_site, author_gravatar, content)
|
|
|
|
|
|
|
|
SELECT id, url, notified, created, published,
|
|
|
|
|
|
|
|
author_name, author_site, author_gravatar, content
|
|
|
|
FROM _comment_old;
|
|
|
|
FROM _comment_old;
|
|
|
|
DROP TABLE _comment_old;
|
|
|
|
DROP TABLE _comment_old;
|
|
|
|
COMMIT;
|
|
|
|
COMMIT;
|
|
|
|