Skip to content

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

chore: dml for backfilling querier and exporter (#5980)

Danny Xu52173495f457
diff --git a/backend/migrator/migration/dev/20230510000000##backfill_project_role.sql b/backend/migrator/migration/dev/20230510000000##backfill_project_role.sql
new file mode 100644
index 0000000000..ad7e7128c3
--- /dev/null
+++ b/backend/migrator/migration/dev/20230510000000##backfill_project_role.sql
@@ -0,0 +1,9 @@
+INSERT INTO project_member (row_status, creator_id, updater_id, project_id, role, principal_id, condition)
+SELECT row_status, creator_id, updater_id, project_id, 'EXPORTER', principal_id, condition
+FROM project_member
+WHERE role = 'DEVELOPER';
+
+INSERT INTO project_member (row_status, creator_id, updater_id, project_id, role, principal_id, condition)
+SELECT row_status, creator_id, updater_id, project_id, 'QUERIER', principal_id, condition
+FROM project_member
+WHERE role = 'DEVELOPER';