Skip to content

Commit

Permalink
Merge pull request #3437 from ushahidi/use-mysql-strict
Browse files Browse the repository at this point in the history
Use mysql strict mode
  • Loading branch information
rjmackay committed Dec 6, 2018
2 parents e9fda73 + 1219632 commit 48b6893
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
'collation' => env('DB_COLLATION', 'utf8_unicode_ci'),
'prefix' => env('DB_PREFIX', ''),
'timezone' => env('DB_TIMEZONE', '+00:00'),
'strict' => env('DB_STRICT_MODE', false),
'strict' => env('DB_STRICT_MODE', true),
],

'pgsql' => [
Expand Down Expand Up @@ -104,7 +104,7 @@
'collation' => env('DB_COLLATION', 'utf8_unicode_ci'),
'prefix' => env('DB_PREFIX', ''),
'timezone' => env('DB_TIMEZONE', '+00:00'),
'strict' => env('DB_STRICT_MODE', false),
'strict' => env('DB_STRICT_MODE', true),
],

],
Expand Down
21 changes: 21 additions & 0 deletions migrations/20181206211859_allow_null_export_batch_filename.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

use Phinx\Migration\AbstractMigration;

class AllowNullExportBatchFilename extends AbstractMigration
{
public function up()
{
$this->table('export_batches')
->changeColumn('filename', 'string', [
'default' => '',
'null' => true
])
->update();
}

public function down()
{
// No op. Don't reverse this or it causes bugs
}
}

0 comments on commit 48b6893

Please sign in to comment.