Skip to content

Commit

Permalink
Update migration herlper for translations to default active field to …
Browse files Browse the repository at this point in the history
…false to comply with some versions of PostgreSQL
  • Loading branch information
sauron authored and ifox committed Nov 19, 2023
1 parent f10733d commit 0df914c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Helpers/migrations_helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function createDefaultTranslationsTableFields($table, $tableNameSingular, $table
$table->softDeletes();
$table->timestamps();
$table->string('locale', 7)->index();
$table->boolean('active');
$table->boolean('active')->default(false);

$table->foreign("{$tableNameSingular}_id", "fk_{$tableNameSingular}_translations_{$tableNameSingular}_id")->references('id')->on($tableNamePlural)->onDelete('CASCADE');
$table->unique(["{$tableNameSingular}_id", 'locale'], "{$tableNameSingular}_id_locale_unique");
Expand Down

0 comments on commit 0df914c

Please sign in to comment.