src/meta/model/migration/README.md
WARNING: Migration files are used to define schema changes for the database. Each migration file contains an up and down function, which are used to define upgrade and downgrade operations for the schema.
When you need to make schema changes to the system catalog, you need to generate a new migration file and then apply it to the database. Note that each migration file can only be applied once and will be recorded in a system table, so for new schema changes, you need to generate a new migration file. Unless you are sure the modification of the migration file has not been included in any released version yet, DO NOT modify already published migration files.
DATABASE_URL=sqlite::memory: cargo run -- generate MIGRATION_NAME
DATABASE_URL to the actual database endpoint.
cargo run
cargo run -- up
cargo run -- up -n 10
cargo run -- down
cargo run -- down -n 10
cargo run -- fresh
cargo run -- refresh
cargo run -- reset
cargo run -- status
MySQL data types typically have stricter length limits compared to those in PostgreSQL or SQLite. For example, the VARCHAR, TEXT, BLOB, and BINARY data types have a maximum length of 65,535 bytes.
If you need to store more data, e.g., SQL definition, UDF body, protobuf-encoded internal data, etc., please avoid using the built-in constructors like ColumnDef::text or ColumnDef::blob, but use the extensions defined in ./src/utils.rs instead.