snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Creating DB tables fails

Open jblandin04 opened this issue 10 years ago • 1 comments

Expected Behavior (or desired behavior if a feature request)

when running this command: 'php artisan app:install --env=production', it fails with the errors below.


Actual Behavior

Step: 2

Preparing your Application

Application key [tjxg8ai8i1dzCDIr1GmS9fsFTtzd6GNH] set successfully. Migration table created successfully.

[Illuminate\Database\QueryException] SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'created_at' (SQL: create table users (id int unsigned not null auto_increment primary key, email varchar(255) not null, password varchar(255) not null, pe rmissions text null, activated tinyint(1) not null default '0', activation_cod e varchar(255) null, activated_at timestamp null, last_login timestamp null, persist_code varchar(255) null, reset_password_code varchar(255) null, first_ name varchar(255) null, last_name varchar(255) null, created_at timestamp def ault 0 not null, updated_at timestamp default 0 not null) default character set utf8 collate utf8_unicode_ci engine = InnoDB)

[PDOException] SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'created_at'


Please confirm you have done the following before posting your bug report:

  • [X ] I have enabled debug mode....
  • [ X] I have read checked the Common Issues page

Please provide answers to these questions before posting your bug report:

  • Version of Snipe-IT you're running: Latest wget pull from master (7/6/16)
  • What OS and web server you're running Snipe-IT on? 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
  • What method you used to install Snipe-IT (install.sh, manual installation, docker, etc) install.sh
  • If you're getting an error in your browser, include that error
  • What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error
  • 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.
  • Include what you've done so far in the installation, and if you got any error messages along the way.
  • Indicate whether or not you've manually edited any data directly in the database

jblandin04 avatar Jul 07 '16 16:07 jblandin04

https://github.com/snipe/snipe-it/issues/1509

snipe avatar Jul 07 '16 16:07 snipe