-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAlters.sql
More file actions
46 lines (31 loc) · 1.1 KB
/
Alters.sql
File metadata and controls
46 lines (31 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
ALTER TABLE Patterns
ADD creationDate DATETIME;
ALTER TABLE Projects
ADD creationDate DATETIME;
ALTER TABLE PriceValues
ADD CurrencySymbol VARCHAR(6) NOT NULL;
ALTER TABLE PaymentsAttempts
MODIFY Username NVARCHAR(65) NOT NULL;
ALTER TABLE PaymentsAttempts
RENAME TO PaymentAttempts;
ALTER TABLE PaymentAttempts
RENAME COLUMN PaymentAttemptsId TO PaymentAttemptId;
ALTER TABLE Transactions
RENAME COLUMN PaymentAttemptsId TO PaymentAttemptId;
ALTER TABLE PaymentAttempts
DROP COLUMN PaymentConceptId;
ALTER TABLE Plans
MODIFY EndTime datetime NULL;
ALTER TABLE Steps
ADD StepNumber INT NOT NULL;
UPDATE Patterns SET creationDate = CURRENT_TIMESTAMP WHERE creationDate IS NULL;
ALTER TABLE Patterns
MODIFY creationDate datetime NOT NULL;
ALTER TABLE PlansPerUser ADD TransactionId BIGINT NOT NULL;
ALTER TABLE PlansPerUser ADD CONSTRAINT fk_PlansPerUser_Transactions1 FOREIGN KEY (TransactionId) REFERENCES KnitHub.Transactions (TransactionId);
ALTER TABLE PlansPerUser
DROP PRIMARY KEY;
ALTER TABLE PlansPerUser
MODIFY PostTime DATETIME NOT NULL;
ALTER TABLE PlansPerUser
MODIFY NextTime DATETIME NOT NULL;