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

Add IF NOT EXISTS to alter blueprint #2

Open
dextermb opened this issue Aug 7, 2019 · 3 comments
Open

Add IF NOT EXISTS to alter blueprint #2

dextermb opened this issue Aug 7, 2019 · 3 comments

Comments

@dextermb
Copy link
Contributor

dextermb commented Aug 7, 2019

This can be accomplished by using the PRAGMA functions.

P.S: The alter blueprint is also called the "Alert" blueprint

@jaredkove
Copy link

Would we want this? would this result in the silent failing of migrations if anything were to be present when it shouldn't have been?

@dextermb
Copy link
Contributor Author

dextermb commented Aug 7, 2019

Would we want this? would this result in the silent failing of migrations if anything were to be present when it shouldn't have been?

Currently how one of our projects is structure, it will error if you clear the database. This is because the migrations are attempted to be ran while the internal DB handler also tries to add columns.

Users should never see this issue in production, but it would make development smoother.

@dextermb
Copy link
Contributor Author

This actually may be more of an issue then first anticipated as any new devices will start with a fresh DB, causing the collision.

cc: @robmilward

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

No branches or pull requests

2 participants