Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: prune migration files (#16217)

Danny Xu219514df5e31
diff --git a/backend/migrator/migration/2.22/0000##update_policy.sql b/backend/migrator/migration/2.22/0000##update_policy.sql
deleted file mode 100644
index bf9e0e7e6b..0000000000
--- a/backend/migrator/migration/2.22/0000##update_policy.sql
+++ /dev/null
@@ -1,7 +0,0 @@
-UPDATE policy
-SET type = 'bb.policy.iam'
-WHERE type = 'bb.policy.project-iam';
-
-UPDATE policy
-SET resource_id = 0
-WHERE resource_type = 'WORKSPACE';
\ No newline at end of file
diff --git a/backend/migrator/migration/2.22/0001##workspace_iam_policy.sql b/backend/migrator/migration/2.22/0001##workspace_iam_policy.sql
deleted file mode 100644
index 27e272ad7c..0000000000
--- a/backend/migrator/migration/2.22/0001##workspace_iam_policy.sql
+++ /dev/null
@@ -1,34 +0,0 @@
-INSERT INTO policy
-(
- creator_id,
- updater_id,
- type,
- payload,
- resource_type,
- resource_id,
- inherit_from_parent
-)
-SELECT
- 1,
- 1,
- 'bb.policy.iam',
- jsonb_build_object('bindings', jsonb_agg(t2.binding) || '{"role": "roles/workspaceMember", "members": ["allUsers"]}'::jsonb),
- 'WORKSPACE',
- 0,
- FALSE
-FROM
-(
- SELECT
- 'roles/'||role AS role,
- array_agg('users/' || principal_id) AS members
- FROM member
- WHERE role != 'workspaceMember'
- GROUP BY role
-) t1
-LEFT JOIN LATERAL (
- SELECT
- jsonb_build_object(
- 'role', t1.role,
- 'members', t1.members
- ) AS binding
-) t2 ON TRUE;
diff --git a/backend/migrator/migration/2.22/0002##drop_env_index.sql b/backend/migrator/migration/2.22/0002##drop_env_index.sql
deleted file mode 100644
index 94023f394f..0000000000
--- a/backend/migrator/migration/2.22/0002##drop_env_index.sql
+++ /dev/null
@@ -1 +0,0 @@
-DROP INDEX idx_environment_unique_name;
\ No newline at end of file
diff --git a/backend/migrator/migration/2.22/0003##data_source_query_env_policy.sql b/backend/migrator/migration/2.22/0003##data_source_query_env_policy.sql
deleted file mode 100644
index 4f5b5b96dd..0000000000
--- a/backend/migrator/migration/2.22/0003##data_source_query_env_policy.sql
+++ /dev/null
@@ -1,20 +0,0 @@
-INSERT INTO policy (creator_id, updater_id, type, payload, resource_type, resource_id, inherit_from_parent)
-SELECT
- 1,
- 1,
- 'bb.policy.data-source-query',
- '{"adminDataSourceRestriction": "FALLBACK"}',
- 'ENVIRONMENT',
- e.id,
- false
-FROM
- environment e
-WHERE
- NOT EXISTS (
- SELECT 1
- FROM policy p
- WHERE
- p.resource_type = 'ENVIRONMENT'
- AND p.resource_id = e.id
- AND p.type = 'bb.policy.data-source-query'
- );
diff --git a/backend/migrator/migration/2.22/0004##db_schema_json.sql b/backend/migrator/migration/2.22/0004##db_schema_json.sql
deleted file mode 100644
index ce375fc496..0000000000
--- a/backend/migrator/migration/2.22/0004##db_schema_json.sql
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE db_schema ALTER metadata TYPE JSON;
diff --git a/backend/migrator/migration/2.23/0000##principal_profile.sql b/backend/migrator/migration/2.23/0000##principal_profile.sql
deleted file mode 100644
index e377bf6338..0000000000
--- a/backend/migrator/migration/2.23/0000##principal_profile.sql
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE principal ADD profile JSONB NOT NULL DEFAULT '{}';
diff --git a/backend/migrator/migration/2.23/0001##deprecate_member.sql b/backend/migrator/migration/2.23/0001##deprecate_member.sql
deleted file mode 100644
index 892520a327..0000000000
--- a/backend/migrator/migration/2.23/0001##deprecate_member.sql
+++ /dev/null
@@ -1 +0,0 @@
-DROP TABLE IF EXISTS member;
\ No newline at end of file