aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-06-17 13:05:00 +0800
committercrupest <crupest@outlook.com>2020-06-17 13:05:00 +0800
commit0b83313774dbd7e2df0ef3384febcbbe94bccf9d (patch)
treed1556347c3f5575f31e47491c4ac6143be15215c
parent1e2ee47007c9057a025e0c77c56443aef7b0dd59 (diff)
downloadtimeline-0b83313774dbd7e2df0ef3384febcbbe94bccf9d.tar.gz
timeline-0b83313774dbd7e2df0ef3384febcbbe94bccf9d.tar.bz2
timeline-0b83313774dbd7e2df0ef3384febcbbe94bccf9d.zip
fix(database): Fix a critical bug in database migration.
-rw-r--r--Timeline/Migrations/20200614061237_AddTimelineUniqueId.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Timeline/Migrations/20200614061237_AddTimelineUniqueId.cs b/Timeline/Migrations/20200614061237_AddTimelineUniqueId.cs
index 2d579544..7abbed79 100644
--- a/Timeline/Migrations/20200614061237_AddTimelineUniqueId.cs
+++ b/Timeline/Migrations/20200614061237_AddTimelineUniqueId.cs
@@ -19,12 +19,13 @@ CREATE TABLE new_timelines (
description TEXT NULL,
owner INTEGER NOT NULL,
visibility INTEGER NOT NULL,
- create_time TEXT NOT NULL, current_post_local_id INTEGER NOT NULL DEFAULT 0,
+ create_time TEXT NOT NULL,
+ current_post_local_id INTEGER NOT NULL DEFAULT 0,
CONSTRAINT FK_timelines_users_owner FOREIGN KEY (owner) REFERENCES users (id) ON DELETE CASCADE
);
-INSERT INTO new_timelines (id, name, description, owner, visibility, create_time)
- SELECT id, name, description, owner, visibility, create_time FROM timelines;
+INSERT INTO new_timelines (id, name, description, owner, visibility, create_time, current_post_local_id)
+ SELECT id, name, description, owner, visibility, create_time, current_post_local_id FROM timelines;
DROP TABLE timelines;