PC-1016 Rename column creator
to creatorId
This commit is contained in:
parent
eb37c5da2e
commit
09e5d13b96
@ -65,7 +65,7 @@ public class SnapshotRepository
|
||||
return token;
|
||||
}
|
||||
|
||||
private static final String INSERT_SNAPSHOT = "INSERT INTO snapshots (token, creator) VALUES (?, ?);";
|
||||
private static final String INSERT_SNAPSHOT = "INSERT INTO snapshots (token, creatorId) VALUES (?, ?);";
|
||||
private static final String INSERT_MESSAGE = "INSERT INTO snapshotMessages (senderId, `server`, `time`, message, snapshotType) VALUES (?, ?, ?, ?, ?);";
|
||||
private static final String INSERT_MESSAGE_RECIPIENT = "INSERT INTO snapshotRecipients (messageId, recipientId) VALUES (?, ?);";
|
||||
private static final String INSERT_MESSAGE_MAPPING = "INSERT INTO snapshotMessageMap (snapshotId, messageId) VALUES (?, ?);";
|
||||
|
@ -1,7 +1,10 @@
|
||||
-- RENAME COLUMN `creator` to `creatorId`
|
||||
ALTER TABLE Account.snapshots CHANGE creator creatorId INT(11);
|
||||
|
||||
-- STORE DATETIME SNAPSHOT CREATED (CLEANUP PURPOSES)
|
||||
ALTER TABLE Account.snapshots ADD created DATETIME DEFAULT NOW() NOT NULL;
|
||||
ALTER TABLE Account.snapshots
|
||||
MODIFY COLUMN creator INT(11) AFTER created;
|
||||
MODIFY COLUMN creatorId INT(11) AFTER created;
|
||||
|
||||
-- CASCADE HANDLERS TABLE
|
||||
ALTER TABLE Account.reportHandlers DROP FOREIGN KEY reportHandlers_reports_id_fk;
|
||||
|
Loading…
Reference in New Issue
Block a user