Skip to content

Consolidate and fix migration - #425

Merged
dartcafe merged 6 commits into
masterfrom
patch-migration
Nov 25, 2018
Merged

Consolidate and fix migration#425
dartcafe merged 6 commits into
masterfrom
patch-migration

Conversation

@dartcafe

@dartcafedartcafe commented Nov 16, 2018

Copy link
Copy Markdown
Collaborator

@nickvergessennickvergessen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Works 👍

Comment threadlib/Migration/Version009000Date20181116063745.php Outdated
Comment threadlib/Migration/Version009000Date20181116063745.php Outdated
Comment threadlib/Migration/Version009000Date20181116063745.php Outdated
Comment threadlib/Migration/Version009000Date20181116063745.php Outdated
Comment threadlib/Migration/Version009000Date20181116063745.php Outdated
@nickvergessen

Copy link
Copy Markdown
Member

Also in theory your migrations are named wrongly.
See nextcloud/server#12275 (comment) for the intended schema.

So in theory your files should be called 0009

@dartcafe

Copy link
Copy Markdown
CollaboratorAuthor

So in theory your files should be called 0009

OMG. You're right.

@dartcafe

Copy link
Copy Markdown
CollaboratorAuthor

I can change this, but does this affect the migration system, if users installed the RCs?

@nickvergessen

Copy link
Copy Markdown
Member

Since RC is git only, you can do it.
Also your migrations look save enough to not cause troubles, because you check if the table exists before adding it again etc.

But you can simply change the file+class names and run the update locally and see if it does 💥

@dartcafedartcafe mentioned this pull request Nov 21, 2018
@dartcafe

dartcafe commented Nov 25, 2018

Copy link
Copy Markdown
CollaboratorAuthor

@nickvergessen thanks for help

  • updated function names
  • removed unused code
  • consolidated migrations

@nickvergessennickvergessen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since you never released this yet, consolidating is okay. But in theory you should not do this as soon as it was released. You should also never edit a released migration, just add a new one.

And you file names should be 0009 not 000009. But not too important.

But the && stuff needs changing

Comment threadlib/Migration/Version000009Date20180202213017.php Outdated
Comment threadlib/Migration/Version000009Date20180202213017.php Outdated
Comment threadlib/Migration/Version000009Date20180202213017.php Outdated
Comment threadlib/Migration/Version000009Date20180202213017.php Outdated
@dartcafedartcafe changed the title Added default 0 to' vote_option_id'Consolidate and fix migrationNov 25, 2018
@dartcafe

Copy link
Copy Markdown
CollaboratorAuthor

And you file names should be 0009 not 000009. But not too important.

@nickvergessen I am a nitpicker. :-) So thanks for the hint. I updated the file names.

@dartcafe

Copy link
Copy Markdown
CollaboratorAuthor

Since you never released this yet, consolidating is okay. But in theory you should not do this as soon as it was released. You should also never edit a released migration, just add a new one.

@nickvergessen This was indeed because this was never released. I just wanted to make it more handy for the initial use of the migration system.

@dartcafe
dartcafe dismissed nickvergessen’s stale reviewNovember 25, 2018 18:46

Removed th second table check.

@dartcafe
dartcafe merged commit bf59ea3 into masterNov 25, 2018
@dartcafe
dartcafe deleted the patch-migration branch November 25, 2018 18:47
@nickvergessen

Copy link
Copy Markdown
Member

👍🏼

Sign up for freeto 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.

2 participants

@dartcafe@nickvergessen