Guest User

Untitled

a guest
Oct 21st, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. [IlluminateDatabaseQueryException]
  2. SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'due_date' (SQL: ALTER TABLE redemption_items
  3. CHANGE dueDate due_date DATETIME DEFAULT 'NULL')
  4.  
  5. class CreateTestTable extends Migration
  6. {
  7. public function up()
  8. {
  9. Schema::create('test', function (Blueprint $table) {
  10. $table->increments('id');
  11. $table->dateTime('dueDate')->nullable();
  12. });
  13. }
  14. }
  15.  
  16. class RenameColumn extends Migration
  17. {
  18. public function up()
  19. {
  20. Schema::table('test', function(Blueprint $table) {
  21. $table->renameColumn('dueDate', 'due_date');
  22. });
  23. }
  24. }
Add Comment
Please, Sign In to add comment