Skip to content

Conversation

@CCXLV
Copy link

@CCXLV CCXLV commented Dec 10, 2025

New Features

Added support for a sea-orm.toml configuration file.

[database]
url = { env = "DATABASE_URL" }

[migrations]
directory = "./migration"

database.url - Can be a full database URL or a reference using the env to load the value from an environment variable.
migrations.directory - Relative path to the migration directory, resolved from the location of the config file.

This configuration file replaces the need to pass migration_dir and database_url as command-line arguments to sea-orm-cli.
It makes the CLI easier to use by centralizing configuration in one place and also opens the door for future features that rely on consistent config.

Changes

The sea-orm-cli migrate command no longer accepts the migration_dir and database_url arguments.
These are now fully handled through sea-orm.toml.

Usage

If the config file is missing, the CLI will show an error explaining that the project is not configured yet, and prompt the user to run:

sea-orm-cli config init

This command will automatically create a sea-orm.toml file in the current directory, prefilled with template values.
Users may then adjust the values as needed.

Copy link
Member

@Huliiiiii Huliiiiii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, that was fast. Thanks for the quick update!

@Huliiiiii Huliiiiii requested review from Expurple and tyt2y3 December 11, 2025 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants