-
Notifications
You must be signed in to change notification settings - Fork 9
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
ISSUE-10, ISSUE-9: Using migrations now isntead of sync and fix short-index collision #11
base: master
Are you sure you want to change the base?
Conversation
Typo in debug message.
…sequelize into ISSUE-10-use-migrations
Did some end to end testing with and found some minor issues. All resolved now and should be good for review. |
I mentioned unrelatedly in a ticket I just opened with a very specific problem with migrations, but you might want to consider wrapping the migrations in a Sequelize Transaction so that they don't get partially applied on failure. There's an example of using transactions with migrations here; it should just involve wrapping the for-loop logic where the actual inserts are happening with this callback:
(P.S., I fully support the move to migrations, even if it's breaking my use case 😂) |
I'll add some notes to the main branch about how to use this and it not be a breaking change. If one updates their SeuqllizeMeta table before switching to this branch, it should be fine. |
Hey, thanks a lot for your work on this PR. I have been extremely busy this last month and the ltijs related projects are basically in stand by while i deal with some issues. I should be getting back to it soon and reviewing/merging this is at the top of the list. Sorry for the delay. |
Rebuild to resolve conflicts. |
Bump; just wanted to check the status on this. |
Fix short-index Collision and Use Migrations instead of sync()
Fixes
This branch uses migrations and removes the use of
.sync()
.This is important in a production setting because
sync()
is sometimes unpredictable and destructive in regards to data.This also adds the options to not run migrations so that one may create a separate script to run migrations.
This also fixes the "short index" issue of ISSUE-9
Tickets Included
#10
#9
Breaking Change
If one already has their ltijs deployed, this is a breaking change. There is a way around that. The strategy is to update the migration table to be what it is before the hash-token upgrade and then the next upgrade for hash-tokens column will run fine. The steps are:
sql
BEFORE upgrading/switching to this branch: