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

feat(migrations): add support for initial migrations #818

Merged
merged 1 commit into from Sep 6, 2020

Conversation

B4nan
Copy link
Member

@B4nan B4nan commented Sep 6, 2020

If you want to start using migrations, and you already have the schema generated,
you can do so by creating so called initial migration:

Initial migration can be created only if there are no migrations previously
generated or executed.

npx mikro-orm migration:create --initial

This will create the initial migration, containing the schema dump from
schema:create command. The migration will be automatically marked as executed.

Closes #772

If you want to start using migrations, and you already have the schema generated,
you can do so by creating so called initial migration:

> Initial migration can be created only if there are no migrations previously
> generated or executed.

```sh
npx mikro-orm migration:create --initial
```

This will create the initial migration, containing the schema dump from
`schema:create` command. The migration will be automatically marked as executed.

Closes #772
@B4nan B4nan merged commit 26b2228 into master Sep 6, 2020
@B4nan B4nan deleted the initial-migrations branch September 6, 2020 12:01
@rubiin
Copy link
Contributor

rubiin commented Sep 6, 2020

cool, this was what i needed

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.

Feat: Add features like seeding and fake migrations in the cli
2 participants