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

DB structure not compatible with sqlite #5

Closed
hardfire opened this issue Dec 6, 2018 · 3 comments
Closed

DB structure not compatible with sqlite #5

hardfire opened this issue Dec 6, 2018 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@hardfire
Copy link

hardfire commented Dec 6, 2018

I came here from #46 and wanted to test out this version with sqlite. Unfortunately, it seems like one of the database migration is not sqlite-compatible. Here are the logs

Migrating: 2018_11_09_144227_nullable_field_photo

   Illuminate\Database\QueryException  : SQLSTATE[HY000]: General error: 1 Cannot add a NOT NULL column with default value NULL (SQL: alter table "photos" add column "type_temp" varchar not null)

  at /var/www/Programs/personal/lychee/Lychee-Laravel/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
    660|         // If an exception occurs when attempting to run a query, we'll format the error
    661|         // message to include the bindings with SQL, which will make this exception a
    662|         // lot more helpful to the developer instead of just the database's errors.
    663|         catch (Exception $e) {
  > 664|             throw new QueryException(
    665|                 $query, $this->prepareBindings($bindings), $e
    666|             );
    667|         }
    668|

  Exception trace:

  1   Doctrine\DBAL\Driver\PDOException::("SQLSTATE[HY000]: General error: 1 Cannot add a NOT NULL column with default value NULL")
      /var/www/Programs/personal/lychee/Lychee-Laravel/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:82

  2   PDOException::("SQLSTATE[HY000]: General error: 1 Cannot add a NOT NULL column with default value NULL")
      /var/www/Programs/personal/lychee/Lychee-Laravel/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:80

  Please use the argument -v to see more details.
@ildyria
Copy link
Member

ildyria commented Dec 6, 2018

Thanks for pointing that out.

@ildyria ildyria self-assigned this Dec 6, 2018
@ildyria ildyria added the bug Something isn't working label Dec 6, 2018
@ildyria ildyria closed this as completed in 17c7585 Dec 6, 2018
@ildyria
Copy link
Member

ildyria commented Dec 6, 2018

@hardfire Can you try again ?

@hardfire
Copy link
Author

hardfire commented Dec 6, 2018

@ildyria This seems to work now. Thanks! I am testing this version personally so will raise issues as i see them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants