Skip to content

Destructive migration for missing or broken migrations - #572

Open
t-unit wants to merge 18 commits into
pinchbv:developfrom
t-unit:destructive-migration
Open

Destructive migration for missing or broken migrations#572
t-unit wants to merge 18 commits into
pinchbv:developfrom
t-unit:destructive-migration

Conversation

@t-unit

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

Copy link
Copy Markdown

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

hukjordanjanaq commented Nov 4, 2021

Copy link
Copy Markdown

Hi, have you fix it?

How can I use this in pubspec.yaml?

@hukjordanjanaq

Copy link
Copy Markdown

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

t-unit commented Nov 4, 2021

Copy link
Copy Markdown
Author

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
Copy Markdown

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
Copy Markdown

@vitusortner could you please check it?

@hm-tamim hm-tamim left a comment

Copy link
Copy Markdown

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
Copy Markdown

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