Skip to content

Commit

Permalink
pkp/pkp-lib#2493 Clean up defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Aug 27, 2020
1 parent db9a8ee commit c871f9e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
36 changes: 18 additions & 18 deletions classes/migration/OJSMigration.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function up() {
$table->string('path', 32);
$table->float('seq', 8, 2)->default(0)->comment('Used to order lists of journals');
$table->string('primary_locale', 14);
$table->boolean('enabled')->default(1)->comment('Controls whether or not the journal is considered "live" and will appear on the website. (Note that disabled journals may still be accessible, but only if the user knows the URL.)');
$table->boolean('enabled')->default(true)->comment('Controls whether or not the journal is considered "live" and will appear on the website. (Note that disabled journals may still be accessible, but only if the user knows the URL.)');
$table->unique(['path'], 'journals_path');
});

Expand All @@ -49,13 +49,13 @@ public function up() {
$table->bigInteger('journal_id');
$table->bigInteger('review_form_id')->nullable();
$table->float('seq', 8, 2)->default(0);
$table->boolean('editor_restricted')->default(0);
$table->boolean('meta_indexed')->default(0);
$table->boolean('meta_reviewed')->default(1);
$table->boolean('abstracts_not_required')->default(0);
$table->boolean('hide_title')->default(0);
$table->boolean('hide_author')->default(0);
$table->boolean('is_inactive')->default(0);
$table->boolean('editor_restricted')->default(false);
$table->boolean('meta_indexed')->default(false);
$table->boolean('meta_reviewed')->default(true);
$table->boolean('abstracts_not_required')->default(false);
$table->boolean('hide_title')->default(false);
$table->boolean('hide_author')->default(false);
$table->boolean('is_inactive')->default(false);
$table->bigInteger('abstract_word_count')->nullable();
$table->index(['journal_id'], 'sections_journal_id');
});
Expand All @@ -78,17 +78,17 @@ public function up() {
$table->smallInteger('volume')->nullable();
$table->string('number', 40)->nullable();
$table->smallInteger('year')->nullable();
$table->boolean('published')->default(0);
$table->boolean('current')->default(0);
$table->boolean('published')->default(false);
$table->boolean('current')->default(false);
$table->datetime('date_published')->nullable();
$table->datetime('date_notified')->nullable();
$table->datetime('last_modified')->nullable();
$table->smallInteger('access_status')->default(1);
$table->datetime('open_access_date')->nullable();
$table->boolean('show_volume')->default(0);
$table->boolean('show_number')->default(0);
$table->boolean('show_year')->default(0);
$table->boolean('show_title')->default(0);
$table->boolean('show_volume')->default(false);
$table->boolean('show_number')->default(false);
$table->boolean('show_year')->default(false);
$table->boolean('show_title')->default(false);
$table->string('style_file_name', 90)->nullable();
$table->string('original_style_file_name', 255)->nullable();
$table->string('url_path', 64)->nullable();
Expand Down Expand Up @@ -207,7 +207,7 @@ public function up() {
$table->bigInteger('file_id')->nullable();
$table->float('seq', 8, 2)->default(0);
$table->string('remote_url', 2047)->nullable();
$table->boolean('is_approved')->default(0);
$table->boolean('is_approved')->default(false);
$table->string('url_path', 64)->nullable();
$table->index(['publication_id'], 'publication_galleys_publication_id');
$table->index(['url_path'], 'publication_galleys_url_path');
Expand All @@ -234,11 +234,11 @@ public function up() {
$table->bigInteger('journal_id');
$table->float('cost', 8, 2);
$table->string('currency_code_alpha', 3);
$table->boolean('non_expiring')->default(0);
$table->boolean('non_expiring')->default(false);
$table->smallInteger('duration')->nullable();
$table->smallInteger('format');
$table->boolean('institutional')->default(0);
$table->boolean('membership')->default(0);
$table->boolean('institutional')->default(false);
$table->boolean('membership')->default(false);
$table->boolean('disable_public_display');
$table->float('seq', 8, 2);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function up() {
$table->mediumText('setting_value')->nullable()->change();
});
Capsule::schema()->table('sections', function (Blueprint $table) {
$table->boolean('is_inactive')->default(0);
$table->boolean('is_inactive')->default(false);
});
}

Expand Down

0 comments on commit c871f9e

Please sign in to comment.