<?php

use Illuminate\Database\Migrations\Migration;

class AlterConversionsRemoveOnUpdateFromPaidAtColumn extends Migration
{
    public function up()
    {
        // Due to the doctrine bug updating manually
        // https://github.com/laravel/framework/issues/16526
        $sql = 'ALTER TABLE `conversions` CHANGE `paid_at` `paid_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP';
        DB::update($sql);
        $sql = 'ALTER TABLE `conversions` ALTER COLUMN `paid_at` DROP DEFAULT';
        DB::update($sql);
    }

    public function down()
    {
        $sql = 'ALTER TABLE `conversions` CHANGE `paid_at` `paid_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP';
        DB::update($sql);
    }
}

<?php

use Illuminate\Database\Migrations\Migration;

class AlterConversionsRemoveOnUpdateFromPaidAtColumn extends Migration
{
    public function up()
    {
        // Due to the doctrine bug updating manually
        // https://github.com/laravel/framework/issues/16526
        $sql = 'ALTER TABLE `conversions` CHANGE `paid_at` `paid_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP';
        DB::update($sql);
    }

    public function down()
    {
        $sql = 'ALTER TABLE `conversions` CHANGE `paid_at` `paid_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP';
        DB::update($sql);
    }
}

--- 
+++ 
@@ -10,6 +10,8 @@
         // https://github.com/laravel/framework/issues/16526
         $sql = 'ALTER TABLE `conversions` CHANGE `paid_at` `paid_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP';
         DB::update($sql);
+        $sql = 'ALTER TABLE `conversions` ALTER COLUMN `paid_at` DROP DEFAULT';
+        DB::update($sql);
     }
 
     public function down()
Drop default value from `paid_at` column in Conversions table

remp/remp#739
