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

Fix updates from v2 #2060

Merged
merged 1 commit into from
May 20, 2016
Merged

Fix updates from v2 #2060

merged 1 commit into from
May 20, 2016

Conversation

dmeltzer
Copy link
Contributor

Doing some investigation after #2058 popped up, it looks like the migration file 2013_11_22_213400_edits_to_settings_table.php differs between master and v3. In master it dropped option_name and option_value. In v3, this code is commented out (which explains the setup issues I saw when doing a fresh install, but not issues on a migrate). That means my PR last night was flawed.

This commit checks to ensure the column exists before dropping it. The other solution would be to uncomment the code in the migration, but that feels more unpredictable to me (It's still alpha though, so maybe easier).

This also breaks the migration up into two files because apparentlly with sqlite things behavior is undefined if dropping multiple columns in one migration.

…in a rollback to make the migrations happy. Also break into two migrations to make sqlite happy.
@dmeltzer dmeltzer mentioned this pull request May 20, 2016
2 tasks
@zmorrow
Copy link

zmorrow commented May 20, 2016

Can you walk me through what I need to do, I uncommented those lines and still get the same error. Which table are those columns in?

@dmeltzer
Copy link
Contributor Author

Hi,
The easiest way (without getting into too much git foo) would be to download the following two files:

https://raw.githubusercontent.com/dmeltzer/snipe-it/c52e3b5f9c8eadc01b54f3642b0dc9eca145ee0f/database/migrations/2016_05_20_024859_remove_option_keys_from_settings_table.php
and
https://raw.githubusercontent.com/dmeltzer/snipe-it/c52e3b5f9c8eadc01b54f3642b0dc9eca145ee0f/database/migrations/2016_05_20_143758_remove_option_value_from_settings_table.php

and put them in the snipe-it/database/migrations folder (The first one should overwrite the file that's currently there.

Then try running php artisan migrate once more and see if that fixes things.

Or wait until a bit later today and this or something similar will be available in the main git tree.

@zmorrow
Copy link

zmorrow commented May 20, 2016

Getting the same error, strangely enough it didn't overwrite anything in that migrations folder though.

@dmeltzer
Copy link
Contributor Author

What does ls snipe-it-directory/database/migrations/2016_05* show?

Also, if you are able to hop into the snipe-it gitter (https://gitter.im/snipe/snipe-it) it might be a little easy to take a look at this in real time.

@snipe snipe merged commit 0729238 into snipe:v3 May 20, 2016
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

Successfully merging this pull request may close these issues.

3 participants