-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
SQLSTATE error on migration #2058
Comments
Hi, Are you using sqlite by any chance? |
Hey, no just mysql. |
Tracked down the problem. Working on a fix presently. The code that deleted the option_name and option_value previously was commented out when imported to v3, so the migrations run fine on a new database but not one that has been used for 2.* |
You da man! Thanks bud!! |
If you have the chance to test the commit in PR #2060 and see if it makes your life better, that would be great! |
I responded over on #2060 , still not liking it when I un-comment those lines. Thanks for the help! |
Are you still having this issue wit the latest off v3 branch? |
Im good, had an issue with importing yesterday but did a fresh pull and all good now. Thanks again you are awesome! |
Expected Behavior (or desired behavior if a feature request)
Looking for migration to complete successfully.
Actual Behavior
This is copied from the command line:
Basic usage: composer
For more information just type "composer".
C:\inetpub\wwwroot\snipe-it>php artisan migrate
Do you really wish to run this command? (yes/no) [no]:
**[Illuminate\Database\QueryException]
SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'option
name'; check that column/key exists (SQL: alter table
settings
dropopti on_name
)[PDOException]
SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'option_
name'; check that column/key exists**_
Please confirm you have done the following before posting your bug report:
Please provide answers to these questions before posting your bug report:
Version of Snipe-IT you're running- Trying to update to 3.0
What OS and web server you're running Snipe-IT on- Server 2012 R2, IIS
What method you used to install Snipe-IT (install.sh, manual installation, docker, etc)- manual installation
If you're getting an error in your browser, include that error- I have debug set to true but all that shows is-- Whoops, looks like something went wrong.
What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error- trying to access login page
If a stacktrace is provided in the error, include that too.
Any errors that appear in your browser's error console.
Confirm whether the error is reproduceable on the demo.
Include any additional information you can find in
app/storage/logs
and your webserver's logs LARAVEL.log.[2016-05-20 13:48:26] production.ERROR: exception 'ErrorException' with message 'mcrypt_encrypt(): Key of size 0 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported' in C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Encryption\McryptEncrypter.php:104
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'mcrypt_encrypt(...', 'C:\inetpub\wwwr...', 104, Array)
Fix depreciation math #1 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Encryption\McryptEncrypter.php(104): mcrypt_encrypt('rijndael-256', '', 's:40:"u3XGLZ8bm...', 'cbc', 'qb\x85\xFD\x89\xB2\x18\x98\xC3\xF6\x18\x9F\xCC\xA6\x1A...')
Ability for admin to check out an asset to a user #2 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Encryption\McryptEncrypter.php(77): Illuminate\Encryption\McryptEncrypter->padAndMcrypt('u3XGLZ8bmRkn1Nd...', 'qb\x85\xFD\x89\xB2\x18\x98\xC3\xF6\x18\x9F\xCC\xA6\x1A...')
Add reports - depreciation, people with no assets, etc #3 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(13046): Illuminate\Encryption\McryptEncrypter->encrypt('u3XGLZ8bmRkn1Nd...')
Add category back to Models blade/controller #4 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(13010): Illuminate\Cookie\Middleware\EncryptCookies->encrypt(Object(Illuminate\Http\RedirectResponse))
Needs sexy dashboard summary #5 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
Disallow models/depreciations/categories to be deleted if they have assets associated #6 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(9895): call_user_func_array(Array, Array)
Add location to users, propagate those to assets #7 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
Figure out how to handle multi-seat licenses #8 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
Search box isn't hooked up to anything #9 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
Improve UI of category display to show nesting #10 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(9880): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
Build-out ACLs to set who can view which sections (reports, etc) #11 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(8161): Illuminate\Pipeline\Pipeline->then(Object(Closure))
A user (non-admin) should be able to request an asset [$15] #12 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(8152): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
Column sorting on table displays #13 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(8142): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
Add "clone" option in edit screen for assets #14 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(2400): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
Option to mark assets as requestable. #15 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http{closure}(Object(Illuminate\Http\Request))
Child assets linked to parent assets (HDD, replacement parts, etc) [$100] #16 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
Add warrantee field to assets/models #17 C:\inetpub\wwwroot\snipe-it\app\Http\Middleware\CheckForSetup.php(22): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
Move validation out of the controllers and into the models where it belongs #18 [internal function]: App\Http\Middleware\CheckForSetup->handle(Object(Illuminate\Http\Request), Object(Closure))
Seed database with models, manufacturers, categories, etc. #19 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(9895): call_user_func_array(Array, Array)
Import functions for users, assets, models, etc #20 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
Merge licenses table into assets table #21 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
Fix depreciation on model vs asset #22 C:\inetpub\wwwroot\snipe-it\app\Http\Middleware\NosniffGuard.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
Support multiple companies [$500 awarded] #23 [internal function]: App\Http\Middleware\NosniffGuard->handle(Object(Illuminate\Http\Request), Object(Closure))
Tighten up checkin/checkout UX #24 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(9895): call_user_func_array(Array, Array)
Show number of assets for each asset model in listing page #25 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
Handle errors more sanely when nothing in the DB #26 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
Depreciation fix #27 C:\inetpub\wwwroot\snipe-it\app\Http\Middleware\XssProtectHeader.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
Fix tables on mobile #28 [internal function]: App\Http\Middleware\XssProtectHeader->handle(Object(Illuminate\Http\Request), Object(Closure))
Integrate barcode generation #29 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(9895): call_user_func_array(Array, Array)
Confirmation screens on delete #30 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
Fixing bootstrap process with default values. #31 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
Added confirmation popups for deletes #32 C:\inetpub\wwwroot\snipe-it\app\Http\Middleware\FrameGuard.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
Add notion of lost, stolen, out for deployment, RTD, etc #33 [internal function]: App\Http\Middleware\FrameGuard->handle(Object(Illuminate\Http\Request), Object(Closure))
Update asset index/view blade to reflect new status #34 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(9895): call_user_func_array(Array, Array)
Add CSV export for reports #35 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
Make the Edit Profile page look less assy #36 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
incorrect command chown in README #37 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(13334): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
Develop #38 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
Implement settings #39 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(9895): call_user_func_array(Array, Array)
Settings edit #40 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
Add asset_type to Asset controller #41 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
Fix delete-check on licenses #42 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(11880): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
Fix checkout for licenses #43 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
Fix depreciation report with new licenses structure #44 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(9895): call_user_func_array(Array, Array)
When you soft-delete a user, should free up all associated resources #45 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
Fix miscount on assets in user view #46 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
When the number of seats is edited, handle that smartly #47 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(3250): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
LDAP authentication #48 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
Calendar view(s) for asset check out/in, due date, etc. [$20] #49 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(9895): call_user_func_array(Array, Array)
XSS Issues #50 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
Add postcode to locations #51 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
Make the report columns sortable #52 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
Add autocomplete to the search box #53 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(9880): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
New button weirdly placed on my iPad (3rd gen) #54 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(2347): Illuminate\Pipeline\Pipeline->then(Object(Closure))
Show months until asset is fully depreciated #55 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(2331): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
Disable sorting on action column #56 C:\inetpub\wwwroot\snipe-it\public\index.php(55): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
Spaces get filtered out #57 {main}
Include what you've done so far in the installation, and if you got any error messages along the way. - I am on Step 7 of the upgrade instructions.
Indicate whether or not you've manually edited any data directly in the database. -- I believe so but I only edited items I didn't add any tables or anything.
The text was updated successfully, but these errors were encountered: