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

Destructive migration for missing or broken migrations #572

Open
wants to merge 18 commits into
base: develop
Choose a base branch
from

Conversation

t-unit
Copy link

@t-unit t-unit commented Jun 7, 2021

This add the ability to configure your database to drop all existing data if a migration fails or is missing.

These changes are inspired by #473 but do not always drop the scheme if fallbackToDestructiveMigration is set to true.

Additionally, when dropping data, these changes make sure to drop all existing tables and views, without relying to the current available metadata.

@t-unit t-unit force-pushed the destructive-migration branch from 40b6824 to 324ccdc Compare June 8, 2021 09:45
@t-unit t-unit marked this pull request as ready for review June 8, 2021 11:21
@hukjordanjanaq
Copy link

hukjordanjanaq commented Nov 4, 2021

Hi, have you fix it?

How can I use this in pubspec.yaml?

@hukjordanjanaq
Copy link

I'm triying to use the pull request but i'm getting and error:
Captura de Pantalla 2021-11-03 a la(s) 21 45 04

Captura de Pantalla 2021-11-03 a la(s) 21 45 19

@t-unit
Copy link
Author

t-unit commented Nov 4, 2021

I'm triying to use the pull request but i'm getting an error

You are missing the path, e.g.:

floor:
    git: 
      url: https://github.com/t-unit/floor.git
      ref: destructive-migration-test
      path: floor

@hukjordanjanaq
Copy link

Thank you so much for answering.

Should I use ref: destructive-migration-test or ref: destructive-migration?

With ref: destructive-migration i'm getting and error.

@hm-tamim
Copy link

@vitusortner could you please check it?

Copy link

@hm-tamim hm-tamim left a comment

Choose a reason for hiding this comment

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

Seems alright

@AndrodDevelopers
Copy link

Hello everyone, are there any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants