Skip to content

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

Add bytebase.migration_history(namespace(256), `created_ts`) index to support fetching migration history by database in creation DESC order

天舟0810738db156
diff --git a/db/mysql_migration_schema.sql b/db/mysql_migration_schema.sql
index 57ef70bc4c..331a6fe8d9 100644
--- a/db/mysql_migration_schema.sql
+++ b/db/mysql_migration_schema.sql
@@ -67,4 +67,6 @@ CREATE UNIQUE INDEX bytebase_idx_unique_migration_history_namespace_sequence ON
CREATE UNIQUE INDEX bytebase_idx_unique_migration_history_namespace_engine_version ON bytebase.migration_history (namespace(256), `engine`, version(256));
-CREATE INDEX bytebase_idx_migration_history_namespace_engine_type ON bytebase.migration_history(namespace(256), `engine`, `type`);
\ No newline at end of file
+CREATE INDEX bytebase_idx_migration_history_namespace_engine_type ON bytebase.migration_history(namespace(256), `engine`, `type`);
+
+CREATE INDEX bytebase_idx_migration_history_namespace_created ON bytebase.migration_history(namespace(256), `created_ts`);
\ No newline at end of file