Skip to content

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

chore: preserve license on dev restart (#1440)

Danny Xu2e55a2404b84
diff --git a/store/demo/dev/10000__reset.sql b/store/demo/dev/10000__reset.sql
index 653a2bc5f8..8da14801c0 100644
--- a/store/demo/dev/10000__reset.sql
+++ b/store/demo/dev/10000__reset.sql
@@ -1,9 +1,13 @@
-- For testing, we reset data on each run
--- Do not reset bb.auth.secret so that we don't need to re-login after restart
+-- Do not reset bb.auth.secret so that we don't need to re-login after restart.
+-- Do not reset bb.enterprise.license so that the dev license is preserved after restart.
DELETE FROM
setting
WHERE
- name != 'bb.auth.secret';
+ name != 'bb.auth.secret' AND name != 'bb.enterprise.license';
+-- We have to change the creator and updater to system robot, otherwise, we will get foreign key check errors on
+-- resetting principal table.
+UPDATE setting SET creator_id = 1, updater_id = 1 WHERE name = 'bb.enterprise.license';
DELETE FROM
anomaly;