Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: migration failed: value too long for type character varying(10) in line 0: ALTER TABLE member_infos #41

Open
kokoichi206 opened this issue Jan 19, 2023 · 0 comments

Comments

@kokoichi206
Copy link
Member

kokoichi206 commented Jan 19, 2023

migratedown 実行時に、以下のエラー

$ make migratedown
migrate -path migrations -database "postgresql://ubuntu:sakamichi@localhost:5432/sakamichi?sslmode=disable" -verbose down
2023/01/19 12:52:02 Are you sure you want to apply all down migrations? [y/N]
y
2023/01/19 12:52:03 Applying all down migrations
2023/01/19 12:52:03 Start buffering 2/d localization
2023/01/19 12:52:03 Start buffering 1/d initialize_tables
2023/01/19 12:52:03 Read and execute 2/d localization
2023/01/19 12:52:03 error: migration failed: value too long for type character varying(10) in line 0: ALTER TABLE member_infos
ALTER COLUMN generation TYPE VARCHAR (10),
ALTER COLUMN blood_type TYPE VARCHAR (3);

ALTER TABLE member_infos
DROP CONSTRAINT member_info_id_locale_unique;

ALTER TABLE member_infos
DROP CONSTRAINT fk_locale;

ALTER TABLE member_infos
DROP COLUMN locale_id;

DROP TABLE locales;
 (details: pq: value too long for type character varying(10))
make: *** [Makefile:10: migratedown] Error 1

ここから進めるには、DB に入って dirty=false に書き換える + 再度 migratedown を行う必要がある。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant