migrate code_bundles to bot_versions

This commit is contained in:
Ilion Beyst 2022-07-05 20:33:39 +02:00
parent ea05674b44
commit 8a47b948eb
2 changed files with 8 additions and 0 deletions

View file

@ -0,0 +1,4 @@
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;

View file

@ -0,0 +1,4 @@
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;