Crate aster_forge_db_migration

Crate aster_forge_db_migration 

Source
Expand description

Shared SeaORM migration coordination and schema helpers for Aster products.

Products retain their migration lists, history compatibility policy, table definitions, and data backfills. This crate owns the reusable execution mechanics and migration-only helpers.

Structs§

MigrationLockOptions
Stable cross-process migration lock configuration.
SqliteFtsConfig
SQLite FTS5 virtual table and synchronization-trigger names used by one migration.

Functions§

big_integer_primary_key
Builds the conventional signed 64-bit auto-incrementing primary-key column.
drop_index_if_exists
Drops an index when it exists across all supported database backends.
ensure_postgres_extension
Creates a PostgreSQL extension when it is not already installed.
execute_sqlite_statements
Executes generated SQLite migration statements in order with caller-provided error context.
json_text_column_for_final_schema
Builds a non-null JSON-text column for a migration’s final schema.
mysql_fulltext_index_sql
Builds MySQL’s ngram-backed full-text index statement.
nullable_json_text_column_for_backfill
Builds a nullable JSON-text column suitable for a later data backfill.
postgres_drop_index
Builds a portable DROP INDEX IF EXISTS statement for PostgreSQL migrations.
postgres_trigram_index
Builds a PostgreSQL GIN trigram index statement.
rename_mysql_index_if_exists
Renames a MySQL index when the source exists and the target does not.
run_migrator_with_lock
Runs a standard SeaORM migrator while holding the backend migration lock.
sqlite_fts_down_statements
Builds the SQLite statements that remove FTS synchronization and the virtual table.
sqlite_fts_up_statements
Builds the SQLite FTS5 table, backfill, and synchronization trigger statements.
utc_date_time_column
Builds a UTC datetime column for the schema manager’s backend.
utc_date_time_column_for_backend
Builds a UTC datetime column for an explicit database backend.
with_migration_lock
Runs a product migration callback while holding the backend’s process-wide migration lock.

Type Aliases§

MigrationFuture
Boxed migration callback future tied to the coordinated database connection.