diff options
| author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-07-18 21:03:34 +0200 |
|---|---|---|
| committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-07-18 21:03:34 +0200 |
| commit | 7daf8f643798ce76733006f8469890bf1a3fd05e (patch) | |
| tree | d755c4f0979f56792684b109d263624aef4baaad /planetwars-server/migrations | |
| parent | 608d05bc167c57d190d3c06f250b5e4a5662e77e (diff) | |
| parent | d092f5d89c0fda5cc67349d5489b4ef1b294e053 (diff) | |
| download | planetwars.dev-7daf8f643798ce76733006f8469890bf1a3fd05e.tar.xz planetwars.dev-7daf8f643798ce76733006f8469890bf1a3fd05e.zip | |
Merge branch 'next'
Diffstat (limited to 'planetwars-server/migrations')
4 files changed, 14 insertions, 0 deletions
diff --git a/planetwars-server/migrations/2022-06-10-180418_nullable_match_player_code_bundle/down.sql b/planetwars-server/migrations/2022-06-10-180418_nullable_match_player_code_bundle/down.sql new file mode 100644 index 0000000..bb0b613 --- /dev/null +++ b/planetwars-server/migrations/2022-06-10-180418_nullable_match_player_code_bundle/down.sql @@ -0,0 +1 @@ +ALTER TABLE match_players ALTER COLUMN code_bundle_id SET NOT NULL; diff --git a/planetwars-server/migrations/2022-06-10-180418_nullable_match_player_code_bundle/up.sql b/planetwars-server/migrations/2022-06-10-180418_nullable_match_player_code_bundle/up.sql new file mode 100644 index 0000000..86ab65d --- /dev/null +++ b/planetwars-server/migrations/2022-06-10-180418_nullable_match_player_code_bundle/up.sql @@ -0,0 +1 @@ +ALTER TABLE match_players ALTER COLUMN code_bundle_id DROP NOT NULL; diff --git a/planetwars-server/migrations/2022-07-04-200149_code_bundle_to_bot_version/down.sql b/planetwars-server/migrations/2022-07-04-200149_code_bundle_to_bot_version/down.sql new file mode 100644 index 0000000..89058fe --- /dev/null +++ b/planetwars-server/migrations/2022-07-04-200149_code_bundle_to_bot_version/down.sql @@ -0,0 +1,6 @@ +ALTER TABLE match_players RENAME COLUMN bot_version_id TO code_bundle_id; + +ALTER TABLE bot_versions DROP COLUMN container_digest; +ALTER TABLE bot_versions RENAME COLUMN code_bundle_path TO path; +ALTER TABLE bot_versions ALTER COLUMN path SET NOT NULL; +ALTER TABLE bot_versions RENAME TO code_bundles; diff --git a/planetwars-server/migrations/2022-07-04-200149_code_bundle_to_bot_version/up.sql b/planetwars-server/migrations/2022-07-04-200149_code_bundle_to_bot_version/up.sql new file mode 100644 index 0000000..91afc0c --- /dev/null +++ b/planetwars-server/migrations/2022-07-04-200149_code_bundle_to_bot_version/up.sql @@ -0,0 +1,6 @@ +ALTER TABLE code_bundles RENAME TO bot_versions; +ALTER TABLE bot_versions RENAME COLUMN path to code_bundle_path; +ALTER TABLE bot_versions ALTER COLUMN code_bundle_path DROP NOT NULL; +ALTER TABLE bot_versions ADD COLUMN container_digest TEXT; + +ALTER TABLE match_players RENAME COLUMN code_bundle_id TO bot_version_id; |
