Skip to content

Commit

Permalink
pkp/pkp-lib#9892 DB float type precision added
Browse files Browse the repository at this point in the history
  • Loading branch information
touhidurabir committed Jul 16, 2024
1 parent fced965 commit f822425
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion classes/migration/install/JournalsMigration.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function up(): void
$table->comment('A list of all journals in the installation of OJS.');
$table->bigInteger('journal_id')->autoIncrement();
$table->string('path', 32);
$table->float('seq', 8, 2)->default(0)->comment('Used to order lists of journals');
$table->float('seq', 53)->default(0)->comment('Used to order lists of journals');
$table->string('primary_locale', 28);
$table->smallInteger('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->unique(['path'], 'journals_path');
Expand Down
18 changes: 9 additions & 9 deletions classes/migration/install/OJSMigration.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function up(): void
$table->foreign('review_form_id', 'sections_review_form_id')->references('review_form_id')->on('review_forms')->onDelete('set null');
$table->index(['review_form_id'], 'sections_review_form_id');

$table->float('seq', 8, 2)->default(0);
$table->float('seq', 53)->default(0);
$table->smallInteger('editor_restricted')->default(0);
$table->smallInteger('meta_indexed')->default(0);
$table->smallInteger('meta_reviewed')->default(1);
Expand Down Expand Up @@ -154,7 +154,7 @@ public function up(): void
$table->index(['file_id'], 'issue_galleys_file_id');

$table->string('label', 255)->nullable();
$table->float('seq', 8, 2)->default(0);
$table->float('seq', 53)->default(0);
$table->string('url_path', 64)->nullable();

$table->index(['url_path'], 'issue_galleys_url_path');
Expand Down Expand Up @@ -189,7 +189,7 @@ public function up(): void
$table->foreign('journal_id', 'custom_issue_orders_journal_id')->references('journal_id')->on('journals')->onDelete('cascade');
$table->index(['journal_id'], 'custom_issue_orders_journal_id');

$table->float('seq', 8, 2)->default(0);
$table->float('seq', 53)->default(0);

$table->unique(['issue_id'], 'custom_issue_orders_unique');
});
Expand All @@ -206,7 +206,7 @@ public function up(): void
$table->foreign('section_id', 'custom_section_orders_section_id')->references('section_id')->on('sections')->onDelete('cascade');
$table->index(['section_id'], 'custom_section_orders_section_id');

$table->float('seq', 8, 2)->default(0);
$table->float('seq', 53)->default(0);

$table->unique(['issue_id', 'section_id'], 'custom_section_orders_unique');
});
Expand All @@ -228,7 +228,7 @@ public function up(): void
$table->foreign('section_id', 'publications_section_id')->references('section_id')->on('sections')->onDelete('set null');
$table->index(['section_id'], 'publications_section_id');

$table->float('seq', 8, 2)->default(0);
$table->float('seq', 53)->default(0);

$table->bigInteger('submission_id');
$table->foreign('submission_id', 'publications_submission_id')->references('submission_id')->on('submissions')->onDelete('cascade');
Expand Down Expand Up @@ -274,7 +274,7 @@ public function up(): void
$table->foreign('submission_file_id')->references('submission_file_id')->on('submission_files');
$table->index(['submission_file_id'], 'publication_galleys_submission_file_id');

$table->float('seq', 8, 2)->default(0);
$table->float('seq', 53)->default(0);
$table->string('remote_url', 2047)->nullable();
$table->smallInteger('is_approved')->default(0);
$table->string('url_path', 64)->nullable();
Expand Down Expand Up @@ -318,14 +318,14 @@ public function up(): void
$table->foreign('journal_id', 'subscription_types_journal_id')->references('journal_id')->on('journals')->onDelete('cascade');
$table->index(['journal_id'], 'subscription_types_journal_id');

$table->float('cost', 8, 2);
$table->float('cost', 53);
$table->string('currency_code_alpha', 3);
$table->smallInteger('duration')->nullable();
$table->smallInteger('format');
$table->smallInteger('institutional')->default(0);
$table->smallInteger('membership')->default(0);
$table->smallInteger('disable_public_display');
$table->float('seq', 8, 2);
$table->float('seq', 53);
});

// Locale-specific subscription type data
Expand Down Expand Up @@ -415,7 +415,7 @@ public function up(): void
$table->index(['user_id'], 'completed_payments_user_id');

$table->bigInteger('assoc_id')->nullable();
$table->float('amount', 8, 2);
$table->float('amount', 53);
$table->string('currency_code_alpha', 3)->nullable();
$table->string('payment_method_plugin_name', 80)->nullable();
});
Expand Down

0 comments on commit f822425

Please sign in to comment.