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

Issue upgrade from v2.0.6 to v2.1.0-pre #1556

Closed
scgluis opened this issue Dec 31, 2015 · 10 comments
Closed

Issue upgrade from v2.0.6 to v2.1.0-pre #1556

scgluis opened this issue Dec 31, 2015 · 10 comments

Comments

@scgluis
Copy link

scgluis commented Dec 31, 2015

Hi,

My current version is v2.0.6-14-g74ed75d. I tried to follow the instruction guide below to upgrade to v2.1.0-pre, however, seems not working. Any idea? Below are the screens of my upgrade process. Thank you!

[root@XXXXXXXXXXXX snipeit]# php composer.phar install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file

  • Installing sebastian/version (1.0.6)
    Downloading: 100%
  • Installing sebastian/global-state (dev-master 23af31f)
    Downloading: 100%
  • Installing sebastian/recursion-context (dev-master 994d4a8)
    Downloading: 100%
  • Installing sebastian/exporter (dev-master f88f893)
    Downloading: 100%
  • Installing sebastian/environment (dev-master 6324c90)
    Downloading: 100%
  • Installing sebastian/diff (dev-master 6899b3e)
    Downloading: 100%
  • Installing sebastian/comparator (dev-master 937efb2)
    Downloading: 100%
  • Installing phpunit/php-text-template (1.2.1)
    Downloading: 100%
  • Installing doctrine/instantiator (dev-master 8e884e7)
    Downloading: 100%
  • Installing phpunit/phpunit-mock-objects (2.3.x-dev 5e2645a)
    Downloading: 100%
  • Installing phpunit/php-timer (dev-master 3e82f4e)
    Downloading: 100%
  • Installing phpunit/php-file-iterator (dev-master 6150bf2)
    Downloading: 100%
  • Installing phpunit/php-token-stream (dev-master 3144ae2)
    Downloading: 100%
  • Installing phpunit/php-code-coverage (2.2.x-dev ef1ca68)
    Downloading: 100%
  • Installing phpdocumentor/reflection-docblock (2.0.4)
    Downloading: 100%
  • Installing phpspec/prophecy (dev-master 4f9b1ea)
    Downloading: 100%
  • Installing phpunit/phpunit (4.8.x-dev 73fad41)
    Downloading: 100%
  • Installing facebook/webdriver (dev-master 575600d)
    Downloading: 100%
  • Installing codeception/codeception (2.1.x-dev b95f54c)
    Downloading: 100%
  • Installing hamcrest/hamcrest-php (v1.2.2)
    Downloading: 100%
  • Installing mockery/mockery (0.9.4)
    Downloading: 100%

sebastian/global-state suggests installing ext-uopz ()
phpunit/phpunit-mock-objects suggests installing ext-soap (
)
phpunit/php-code-coverage suggests installing ext-xdebug (>=2.2.1)
phpdocumentor/reflection-docblock suggests installing dflydev/markdown (~1.0)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
codeception/codeception suggests installing codeception/phpbuiltinserver (Extension to start and stop PHP built-in web server for your tests)
codeception/codeception suggests installing codeception/specify (BDD-style code blocks)
codeception/codeception suggests installing codeception/verify (BDD-style assertions)
Generating autoload files
[root@XXXXXXXXXXXX snipeit]# php composer.phar dump-autoload
Generating autoload files
[root@XXXXXXXXXXXX snipeit]# php artisan migrate


  • Application In Production!     *
    

Do you really wish to run this command? y
Nothing to migrate.
[root@XXXXXXXXXXXX snipeit]# php artisan migrate


  • Application In Production!     *
    

Do you really wish to run this command? yes
Nothing to migrate.

@snipe
Copy link
Owner

snipe commented Dec 31, 2015

  1. You should never be running these things as root, as mentioned in the documentation,
  2. You don't have the most recent files if it thinks there's nothing to migrate, or you've already migrated them once before after grabbing the new files, in which case I'd need more detail on what "seems not working" means.

@scgluis
Copy link
Author

scgluis commented Dec 31, 2015

  1. Oh, i think i missed that as i initial setup the system using root as well. I have changed all the files permission to apache using "sudo chown -R apache:apache /var/www/html/snipeit"; does it help? Or I need to create a new account to maintain the system?

  2. what i meant for not working is remaining v2.0.6-14-g74ed75d after running the commands.

Actually, does pre-release version different than "Production" version that's why the last command shows "Nothing to migrate"?

@snipe
Copy link
Owner

snipe commented Dec 31, 2015

There is a known issue in the auto-versioning of the script, so don't pay attention to that, really. If you have Admin > Custom Fields, and you pulled from master or the latest release, you should be fine.

I'm not sure what you're asking about pre-release versus Production. A pre-release is one that's ready for testing, and is considered reasonably stable, but isn't considered a truly stable release yet. Stable release will not be marked as "pre-release".

@scgluis
Copy link
Author

scgluis commented Dec 31, 2015

I don't have Admin > Custom Fields

seems some luck coming as it runs migration script but error showing as below. Do i need to stop any service before calling "php artisan migrate"? Any idea? Thank you!!

php artisan migrate


  • Application In Production!     *
    

Do you really wish to run this command? y

[Illuminate\Database\QueryException]
SQLSTATE[HY000]: General error: 1025 Error on rename of './snipeit/users' t
o './snipeit/#sql2-527-6c1' (errno: 152) (SQL: alter table users drop for
eign key users_company_id_foreign)

[PDOException]
SQLSTATE[HY000]: General error: 1025 Error on rename of './snipeit/users' t
o './snipeit/#sql2-527-6c1' (errno: 152)

migrate [--bench[="..."]] [--database[="..."]] [--force] [--path[="..."]] [--pac kage[="..."]] [--pretend] [--seed]

@scgluis
Copy link
Author

scgluis commented Dec 31, 2015

tried but no luck this time

I read another post (#1430) to rerun "# php composer.phar install --no-dev --prefer-source" and delete "2015_11_30_191504_remove_fk_company_id.php" at app/database/migrations then redo all over again. However, i still don't see "custom fields" under "Admin" menu.

MariaDB [(none)]> use snipeit;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [snipeit]> ALTER TABLE companies ENGINE = InnoDB;
Query OK, 1 row affected (0.01 sec)
Records: 1 Duplicates: 0 Warnings: 0

MariaDB [snipeit]> exit
Bye

-# php composer.phar install --no-dev --prefer-source

Loading composer repositories with package information
Installing dependencies from lock file
Nothing to install or update
Generating autoload files
-# php composer.phar dump-autoload

Generating autoload files
-# php artisan migrate

-**************************************
-* Application In Production! *
-**************************************

Do you really wish to run this command? y
Nothing to migrate.

@snipe
Copy link
Owner

snipe commented Dec 31, 2015

Can you tell me what's in your migrations table?

@scgluis
Copy link
Author

scgluis commented Dec 31, 2015

MariaDB [snipeit]> select * from migrations;
+--------------------------------------------------------------------------+-------+
| migration | batch |
+--------------------------------------------------------------------------+-------+
| 2012_12_06_225921_migration_cartalyst_sentry_install_users | 1 |
| 2012_12_06_225929_migration_cartalyst_sentry_install_groups | 1 |
| 2012_12_06_225945_migration_cartalyst_sentry_install_users_groups_pivot | 1 |
| 2012_12_06_225988_migration_cartalyst_sentry_install_throttle | 1 |
| 2013_03_23_193214_update_users_table | 2 |
| 2013_11_13_075318_create_models_table | 2 |
| 2013_11_13_075335_create_categories_table | 2 |
| 2013_11_13_075347_create_manufacturers_table | 2 |
| 2013_11_15_015858_add_user_id_to_categories | 2 |
| 2013_11_15_112701_add_user_id_to_manufacturers | 2 |
| 2013_11_15_190327_create_assets_table | 2 |
| 2013_11_15_190357_create_licenses_table | 2 |
| 2013_11_15_201848_add_license_name_to_licenses | 2 |
| 2013_11_16_040323_create_depreciations_table | 2 |
| 2013_11_16_042851_add_depreciation_id_to_models | 2 |
| 2013_11_16_084923_add_user_id_to_models | 2 |
| 2013_11_16_103258_create_locations_table | 2 |
| 2013_11_16_103336_add_location_id_to_assets | 2 |
| 2013_11_16_103407_add_checkedout_to_to_assets | 2 |
| 2013_11_16_103425_create_history_table | 2 |
| 2013_11_17_054359_drop_licenses_table | 2 |
| 2013_11_17_054526_add_physical_to_assets | 2 |
| 2013_11_17_055126_create_settings_table | 2 |
| 2013_11_17_062634_add_license_to_assets | 2 |
| 2013_11_18_134332_add_contacts_to_users | 2 |
| 2013_11_18_142847_add_info_to_locations | 2 |
| 2013_11_18_152942_remove_location_id_from_asset | 2 |
| 2013_11_18_164423_set_nullvalues_for_user | 2 |
| 2013_11_19_013337_create_asset_logs_table | 2 |
| 2013_11_19_061409_edit_added_on_asset_logs_table | 2 |
| 2013_11_19_062250_edit_location_id_asset_logs_table | 2 |
| 2013_11_20_055822_add_soft_delete_on_assets | 2 |
| 2013_11_20_121404_add_soft_delete_on_locations | 2 |
| 2013_11_20_123137_add_soft_delete_on_manufacturers | 2 |
| 2013_11_20_123725_add_soft_delete_on_categories | 2 |
| 2013_11_20_130248_create_status_labels | 2 |
| 2013_11_20_130830_add_status_id_on_assets_table | 2 |
| 2013_11_20_131544_add_status_type_on_status_labels | 2 |
| 2013_11_20_134103_add_archived_to_assets | 2 |
| 2013_11_21_002321_add_uploads_table | 2 |
| 2013_11_21_024531_remove_deployable_boolean_from_status_labels | 2 |
| 2013_11_22_075308_add_option_label_to_settings_table | 2 |
| 2013_11_22_213400_edits_to_settings_table | 2 |
| 2013_11_25_013244_create_licenses_table | 2 |
| 2013_11_25_031458_create_license_seats_table | 2 |
| 2013_11_25_032022_add_type_to_actionlog_table | 2 |
| 2013_11_25_033008_delete_bad_licenses_table | 2 |
| 2013_11_25_033131_create_new_licenses_table | 2 |
| 2013_11_25_033534_add_licensed_to_licenses_table | 2 |
| 2013_11_25_101308_add_warrantee_to_assets_table | 2 |
| 2013_11_25_104343_alter_warranty_column_on_assets | 2 |
| 2013_11_25_150450_drop_parent_from_categories | 2 |
| 2013_11_25_151920_add_depreciate_to_assets | 2 |
| 2013_11_25_152903_add_depreciate_to_licenses_table | 2 |
| 2013_11_26_211820_drop_license_from_assets_table | 2 |
| 2013_11_27_062510_add_note_to_asset_logs_table | 2 |
| 2013_12_01_113426_add_filename_to_asset_log | 2 |
| 2013_12_06_094618_add_nullable_to_licenses_table | 2 |
| 2013_12_10_084038_add_eol_on_models_table | 2 |
| 2013_12_12_055218_add_manager_to_users_table | 2 |
| 2014_01_28_031200_add_qr_code_to_settings_table | 2 |
| 2014_02_13_183016_add_qr_text_to_settings_table | 2 |
| 2014_05_24_093839_alter_default_license_depreciation_id | 2 |
| 2014_05_27_231658_alter_default_values_licenses | 2 |
| 2014_06_19_191508_add_asset_name_to_settings | 2 |
| 2014_06_20_004847_make_asset_log_checkedout_to_nullable | 2 |
| 2014_06_20_005050_make_asset_log_purchasedate_to_nullable | 2 |
| 2014_06_24_003011_add_suppliers | 2 |
| 2014_06_24_010742_add_supplier_id_to_asset | 2 |
| 2014_06_24_012839_add_zip_to_supplier | 2 |
| 2014_06_24_033908_add_url_to_supplier | 2 |
| 2014_07_08_054116_add_employee_id_to_users | 2 |
| 2014_07_09_134316_add_requestable_to_assets | 2 |
| 2014_07_17_085822_add_asset_to_software | 2 |
| 2014_07_17_161625_make_asset_id_in_logs_nullable | 2 |
| 2014_08_12_053504_alpha_0_4_2_release | 2 |
| 2014_08_17_083523_make_location_id_nullable | 2 |
| 2014_10_16_200626_add_rtd_location_to_assets | 2 |
| 2014_10_24_000417_alter_supplier_state_to_32 | 2 |
| 2014_10_24_015641_add_display_checkout_date | 2 |
| 2014_10_28_222654_add_avatar_field_to_users_table | 2 |
| 2014_10_29_045924_add_image_field_to_models_table | 2 |
| 2014_11_01_214955_add_eol_display_to_settings | 2 |
| 2014_11_04_231416_update_group_field_for_reporting | 2 |
| 2014_11_05_212408_add_fields_to_licenses | 2 |
| 2014_11_07_021042_add_image_to_supplier | 2 |
| 2014_11_20_203007_add_username_to_user | 2 |
| 2014_11_20_223947_add_auto_to_settings | 2 |
| 2014_11_20_224421_add_prefix_to_settings | 2 |
| 2014_11_21_104401_change_licence_type | 2 |
| 2014_12_09_082500_add_fields_maintained_term_to_licenses | 2 |
| 2015_02_04_155757_increase_user_field_lengths | 2 |
| 2015_02_07_013537_add_soft_deleted_to_log | 2 |
| 2015_02_10_040958_fix_bad_assigned_to_ids | 2 |
| 2015_02_10_053310_migrate_data_to_new_statuses | 2 |
| 2015_02_11_044104_migrate_make_license_assigned_null | 2 |
| 2015_02_11_104406_migrate_create_requests_table | 2 |
| 2015_02_12_001312_add_mac_address_to_asset | 2 |
| 2015_02_12_024100_change_license_notes_type | 2 |
| 2015_02_17_231020_add_localonly_to_settings | 2 |
| 2015_02_19_222322_add_logo_and_colors_to_settings | 2 |
| 2015_02_24_072043_add_alerts_to_settings | 2 |
| 2015_02_25_022931_add_eula_fields | 2 |
| 2015_02_25_204513_add_accessories_table | 2 |
| 2015_02_26_091228_add_accessories_user_table | 2 |
| 2015_02_26_115128_add_deleted_at_models | 2 |
| 2015_02_26_233005_add_category_type | 2 |
| 2015_03_01_231912_update_accepted_at_to_acceptance_id | 2 |
| 2015_03_05_011929_add_qr_type_to_settings | 2 |
| 2015_03_18_055327_add_note_to_user | 2 |
| 2015_04_29_234704_add_slack_to_settings | 2 |
| 2015_05_04_085151_add_parent_id_to_locations_table | 2 |
| 2015_05_22_124421_add_reassignable_to_licenses | 2 |
| 2015_06_10_003314_fix_default_for_user_notes | 2 |
| 2015_06_10_003554_create_consumables | 2 |
| 2015_06_15_183253_move_email_to_username | 2 |
| 2015_06_23_070346_make_email_nullable | 2 |
| 2015_06_26_213716_create_asset_maintenances_table | 2 |
| 2015_07_09_014359_add_currency_to_settings_and_locations | 2 |
| 2015_07_21_122022_add_expected_checkin_date_to_asset_logs | 2 |
| 2015_07_24_093845_add_checkin_email_to_category_table | 2 |
| 2015_07_25_055415_remove_email_unique_constraint | 2 |
| 2015_07_29_230054_add_thread_id_to_asset_logs_table | 2 |
| 2015_07_31_015430_add_accepted_to_assets | 2 |
| 2015_09_09_195301_add_custom_css_to_settings | 2 |
| 2015_09_28_003314_fix_default_purchase_order | 2 |
| 2015_10_01_024551_add_accessory_consumable_price_info | 2 |
| 2015_10_12_192706_add_brand_to_settings | 2 |
| 2015_10_22_003314_fix_defaults_accessories | 2 |
| 2015_10_23_182625_add_checkout_time_and_expected_checkout_date_to_assets | 2 |
| 2015_11_05_061015_create_companies_table | 2 |
| 2015_11_05_061115_add_company_id_to_consumables_table | 2 |
| 2015_11_05_183749_image | 2 |
| 2015_11_06_092038_add_company_id_to_accessories_table | 2 |
| 2015_11_06_100045_add_company_id_to_users_table | 2 |
| 2015_11_06_134742_add_company_id_to_licenses_table | 2 |
| 2015_11_08_035832_add_company_id_to_assets_table | 2 |
| 2015_11_08_222305_add_ldap_fields_to_settings | 2 |
| 2015_11_15_151803_add_full_multiple_companies_support_to_settings_table | 2 |
| 2015_11_26_195528_import_ldap_settings | 2 |
| 2015_11_30_191504_remove_fk_company_id | 2 |
+--------------------------------------------------------------------------+-------+
141 rows in set (0.00 sec)

@scgluis
Copy link
Author

scgluis commented Jan 4, 2016

any idea?

@scgluis scgluis closed this as completed Jan 4, 2016
@scgluis scgluis reopened this Jan 4, 2016
@scgluis
Copy link
Author

scgluis commented Jan 4, 2016

Finally i got some luck here. i don't know what i did wrong but i uninstall mysql and reinstall everything again. It works perfectly and now it shows v2.1.0-pre-g4aa3768 with custom fields. Thank you!

@snipe snipe closed this as completed Jan 6, 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

No branches or pull requests

2 participants