Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [IlluminateDatabaseQueryException]
- SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'due_date' (SQL: ALTER TABLE redemption_items
- CHANGE dueDate due_date DATETIME DEFAULT 'NULL')
- class CreateTestTable extends Migration
- {
- public function up()
- {
- Schema::create('test', function (Blueprint $table) {
- $table->increments('id');
- $table->dateTime('dueDate')->nullable();
- });
- }
- }
- class RenameColumn extends Migration
- {
- public function up()
- {
- Schema::table('test', function(Blueprint $table) {
- $table->renameColumn('dueDate', 'due_date');
- });
- }
- }
Add Comment
Please, Sign In to add comment