-
Notifications
You must be signed in to change notification settings - Fork 425
Open
Labels
Description
π Bug Report
pwpush fails on db:migrate with pglombardo/pwpush:1.63.0-g and mariadb:11.4.
β Expected
Container pwpush starts with successful database migration.
β Actual
ActiveRecord migration fails on Active Storage foreign key (fresh install) :
ActiveRecord::MismatchedForeignKey: Column "blob_id" on table "active_storage_attachments"
does not match column "id" on "active_storage_blobs" (type bigint(20)).
To resolve: change "blob_id" to :bigint.
Original: Mysql2::Error: Can"t create table "db"."active_storage_attachments"
(errno: 150 "Foreign key constraint is incorrectly formed")
π¬ How To Reproduce (docker-compose.yml)
services:
pwpush:
container_name: pwpush
image: pglombardo/pwpush:1.63.0-g
restart: unless-stopped
environment:
- DATABASE_URL=mysql2://user:password@pwpush-db:3306/db
depends_on:
- pwpush-db
volumes:
- /data/pwpush/storage:/opt/PasswordPusher/storage
pwpush-db:
container_name: pwpush-db
image: mariadb:11.4
restart: unless-stopped
environment:
MARIADB_USER: "user"
MARIADB_PASSWORD: "password"
MARIADB_DATABASE: "db"
MARIADB_RANDOM_ROOT_PASSWORD: "yes"
volumes:
- /data/pwpush/db:/var/lib/mysql
π§© Environment
OS: Debian 13 amd64
Docker: 28.5.1
Images:
- pwpush: pglombardo/
pwpush:1.63.0-g - mariadb:
mariadb:11.4
π§ Hypothesis (IA)
active_storage_attachments.blob_id created as int(11) while active_storage_blobs.id is bigint(20), producing a type mismatch and preventing foreign key creation.
π οΈ Workarounds (IA)
ALTER TABLE active_storage_attachments MODIFY blob_id BIGINT(20) NOT NULL;