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

Initial install script failing on db installation, tries to drop tables that don't exist #69

Closed
dstockto opened this issue Nov 27, 2013 · 4 comments

Comments

@dstockto
Copy link

On running

php artisan app:install

I get the following error:

Migration table created successfully.
Migrated: 2012_12_06_225921_migration_cartalyst_sentry_install_users
Migrated: 2012_12_06_225929_migration_cartalyst_sentry_install_groups
Migrated: 2012_12_06_225945_migration_cartalyst_sentry_install_users_groups_pivot
Migrated: 2012_12_06_225988_migration_cartalyst_sentry_install_throttle

[Exception]
SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table 'posts' (SQL: drop table posts) (Bindings: array ())

In /app/database/migrations/2013_11_25_000345_drop_comments_posts_tables.php there are instructions to drop the 'posts' and 'comments' schema but neither exists and they will cause errors that stop the migration.

I don't know much about the migrations as far as if that file can just be removed and things will work, but commenting out the two drop instructions did allow it to complete successfully.

@snipe
Copy link
Owner

snipe commented Nov 27, 2013

Yeah, delete that file and try again. If it works for you, I'll remove it from the source.

@snipe
Copy link
Owner

snipe commented Nov 27, 2013

Sorry, just read the last sentence :) Glad you got it sorted. I'll just remove that file from the source. Someone else had a similar problem, so it's clearly a consistent issue.

@snipe snipe closed this as completed in b1aa67d Nov 27, 2013
@abrahamvegh
Copy link

Worth noting that this was fixable by just changing drop to dropIfExists.
Deleting the migration outright feels better, though. ;)

@ambarishrh
Copy link

I am getting the same error on my installation, but couldn't figure out how to fix it.

[root@snipeit snipeit]# php artisan db:seed

[Illuminate\Database\QueryException]
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'snipeit
_www.assets' doesn't exist (SQL: truncate assets)

db:seed [--class[="..."]] [--database[="..."]]

This was referenced Jul 19, 2016
@ESWBitto ESWBitto mentioned this issue Mar 16, 2017
2 tasks
@bunzladi bunzladi mentioned this issue Mar 10, 2022
2 tasks
@Bjufen Bjufen mentioned this issue Feb 9, 2023
2 tasks
@manhvt20 manhvt20 mentioned this issue Mar 18, 2024
2 tasks
@uglycrab uglycrab mentioned this issue Mar 27, 2024
2 tasks
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

4 participants