-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
On an empty mariadb 11.8 database, tap won't start with this error:
tap_1 | database: tap
tap_1 | Current version: 0
tap_1 |
tap_1 | bin/rails aborted!
tap_1 | ActiveRecord::MismatchedForeignKey: Column `product_id` on table `barcodes` does not match column `id` on `products`, which has type `bigint(20)`. To resolve this issue, change the type of the `product_id` column on `barcodes` to be :bigint. (For example `t.bigint :product_id`). (ActiveRecord::MismatchedForeignKey)
tap_1 | Original message: Mysql2::Error: Can't create table `tap`.`barcodes` (errno: 150 "Foreign key constraint is incorrectly formed")
tap_1 | /tap/db/schema.rb:90:in 'block in <main>'
tap_1 | /tap/db/schema.rb:13:in '<main>'
tap_1 |
tap_1 | Caused by:
tap_1 | ActiveRecord::MismatchedForeignKey: There is a mismatch between the foreign key and primary key column types. Verify that the foreign key column type and the primary key of the associated table match types. (ActiveRecord::MismatchedForeignKey)
tap_1 | Original message: Mysql2::Error: Can't create table `tap`.`barcodes` (errno: 150 "Foreign key constraint is incorrectly formed")
tap_1 | /tap/db/schema.rb:90:in 'block in <main>'
tap_1 | /tap/db/schema.rb:13:in '<main>'
tap_1 |
tap_1 | Caused by:
tap_1 | Mysql2::Error: Can't create table `tap`.`barcodes` (errno: 150 "Foreign key constraint is incorrectly formed") (Mysql2::Error)
tap_1 | /tap/db/schema.rb:90:in 'block in <main>'
tap_1 | /tap/db/schema.rb:13:in '<main>'
tap_1 | Tasks: TOP => db:prepare
tap_1 | (See full trace by running task with --trace)
Metadata
Metadata
Assignees
Labels
No labels