Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating migration from SQL-files #180

Open
vjik opened this issue Jul 14, 2023 · 0 comments
Open

Creating migration from SQL-files #180

vjik opened this issue Jul 14, 2023 · 0 comments
Labels
type:feature New feature

Comments

@vjik
Copy link
Member

vjik commented Jul 14, 2023

This is can be useful for creating migration based on SQL from vendor packages in application

Example of command:

./yii migrate/create --sql-up=/vendor/yiisoft/package/migrations/1/up.sql  --sql-down=/vendor/yiisoft/package/migrations/1/down.sql

Result may be so:

public function up(MigrationBuilder $b): void
{
    $b->execute('... sql from UP file ...');
}

public function down(MigrationBuilder $b): void
{
    $b->execute('... sql from DOWN file ...');
}
@vjik vjik added the type:feature New feature label Jul 14, 2023
@vjik vjik added this to the 1.0.0 milestone Jul 14, 2023
@vjik vjik removed this from the 1.0.0 milestone Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature
Projects
None yet
Development

No branches or pull requests

1 participant