diff options
author | João Abecasis <joao.abecasis@nokia.com> | 2011-01-31 19:24:54 +0100 |
---|---|---|
committer | João Abecasis <joao.abecasis@nokia.com> | 2011-02-02 14:30:21 +0100 |
commit | 8340b716ff418975b7ee16856e49a87ecfb24c4e (patch) | |
tree | 58dd9d2045bbf70ba5010f5004e3eff84626a987 | |
parent | db0f8fa9537111abd7c0f2ae2686de532fbbda41 (diff) |
Split out dropping columns from old schema
... so that can be skipped to start with.
Reviewed-By: jasplin
-rw-r--r-- | database/scripts/add-context-table.sql | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/database/scripts/add-context-table.sql b/database/scripts/add-context-table.sql index 507a580..eb42227 100644 --- a/database/scripts/add-context-table.sql +++ b/database/scripts/add-context-table.sql @@ -36,7 +36,7 @@ CREATE INDEX context_platform_idx ON result (platformId); CREATE INDEX context_branch_idx ON result (branchId); CREATE INDEX context_sha1_idx ON result (sha1Id); --- Update result table schema -- step 1 of 2 +-- Update result table schema -- step 1 of 3 ALTER TABLE result ADD COLUMN contextId BIGINT REFERENCES context ON DELETE CASCADE; UPDATE result @@ -53,9 +53,12 @@ DROP INDEX result_platform_idx; DROP INDEX result_branch_idx; DROP INDEX result_sha1_idx; --- Update result table schema -- step 2 of 2 +-- Update result table schema -- step 2 of 3 +ALTER TABLE result + ALTER COLUMN contextId SET NOT NULL; + +-- Update result table schema -- step 3 of 3 ALTER TABLE result - ALTER COLUMN contextId SET NOT NULL, DROP COLUMN hostId, DROP COLUMN platformId, DROP COLUMN branchId, |