Skip to content

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

Remove bytebase.setting

天舟b9979067d6e9
diff --git a/plugin/db/mysql/mysql_migration_schema.sql b/plugin/db/mysql/mysql_migration_schema.sql
index 2184dbbc9a..2885436142 100644
--- a/plugin/db/mysql/mysql_migration_schema.sql
+++ b/plugin/db/mysql/mysql_migration_schema.sql
@@ -2,41 +2,6 @@
-- Create a database called bytebase
CREATE DATABASE bytebase CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_general_ci';
-CREATE TABLE bytebase.setting (
- id INTEGER PRIMARY KEY AUTO_INCREMENT,
- created_by TEXT NOT NULL,
- created_ts BIGINT NOT NULL,
- updated_by TEXT NOT NULL,
- updated_ts BIGINT NOT NULL,
- name TEXT NOT NULL,
- value TEXT NOT NULL,
- description TEXT NOT NULL
-);
-
-CREATE UNIQUE INDEX bytebase_idx_unique_setting_name ON bytebase.setting (name(256));
-
--- Insert schema version 1
-INSERT INTO
- bytebase.setting (
- created_by,
- created_ts,
- updated_by,
- updated_ts,
- name,
- value,
- description
- )
-VALUES
- (
- 'bytebase',
- UNIX_TIMESTAMP(),
- 'bytebase',
- UNIX_TIMESTAMP(),
- 'bb.schema.version',
- '1',
- 'Schema version'
- );
-
-- Create migration_history table
-- Note, we don't create trigger to update created_ts and updated_ts because that may causes error:
-- ERROR 1419 (HY000): You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
diff --git a/plugin/db/pg/pg_migration_schema.sql b/plugin/db/pg/pg_migration_schema.sql
index eb169bef54..5a7c4f995b 100644
--- a/plugin/db/pg/pg_migration_schema.sql
+++ b/plugin/db/pg/pg_migration_schema.sql
@@ -2,41 +2,6 @@
-- Create a database called bytebase in the driver.
-- CREATE DATABASE bytebase;
-CREATE TABLE setting (
- id SERIAL PRIMARY KEY,
- created_by TEXT NOT NULL,
- created_ts BIGINT NOT NULL,
- updated_by TEXT NOT NULL,
- updated_ts BIGINT NOT NULL,
- name TEXT NOT NULL,
- value TEXT NOT NULL,
- description TEXT NOT NULL
-);
-
-CREATE UNIQUE INDEX bytebase_idx_unique_setting_name ON setting (name(256));
-
--- Insert schema version 1
-INSERT INTO
- setting (
- created_by,
- created_ts,
- updated_by,
- updated_ts,
- name,
- value,
- description
- )
-VALUES
- (
- 'bytebase',
- EXTRACT(epoch from NOW()),
- 'bytebase',
- EXTRACT(epoch FROM NOW()),
- 'bb.schema.version',
- '1',
- 'Schema version'
- );
-
-- Create migration_history table
-- Note, we don't create trigger to update created_ts and updated_ts because that may causes error:
-- ERROR 1419 (HY000): You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)