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

データベースのセットアップでこける #547

Open
iChemy opened this issue Jun 30, 2024 · 2 comments
Open

データベースのセットアップでこける #547

iChemy opened this issue Jun 30, 2024 · 2 comments
Labels
bug Something isn't working environment 環境構築 priority:LOW

Comments

@iChemy
Copy link
Contributor

iChemy commented Jun 30, 2024

2024-06-30 14:24:03 2024/06/30 14:24:03 /app/migration/migrate.go:13 Error 29 (HY000): File './knoq/' not found (Errcode: 2 "No such file or directory")
2024-06-30 14:24:03 [2.184ms] [rows:0] CREATE TABLE `rooms` (`id` char(36),`place` varchar(32),`verified` boolean,`time_start` DATETIME,`time_end` DATETIME,`created_by_refer` char(36),`created_at` datetime NULL,`updated_at` datetime NULL,`deleted_at` datetime NULL,PRIMARY KEY (`id`),INDEX `idx_rooms_time_end` (`time_end`),INDEX `idx_rooms_deleted_at` (`deleted_at`),INDEX `idx_rooms_time_start` (`time_start`),CONSTRAINT `fk_rooms_created_by` FOREIGN KEY (`created_by_refer`) REFERENCES `users`(`id`) ON DELETE CASCADE)
2024-06-30 14:24:03 panic: Error 29 (HY000): File './knoq/' not found (Errcode: 2 "No such file or directory")
2024-06-30 14:24:03 
2024-06-30 14:24:03 goroutine 1 [running]:
2024-06-30 14:24:03 main.main()
2024-06-30 14:24:03     /app/main.go:61 +0x8e4

_development ディレクトリを削除すると起こる

@iChemy iChemy added bug Something isn't working environment 環境構築 labels Jun 30, 2024
@iChemy
Copy link
Contributor Author

iChemy commented Jun 30, 2024

一回失敗して _development を消さずにもう一回動かすとうまくいきそう

@ras0q
Copy link
Member

ras0q commented Jun 30, 2024

volumes:
  - "./_development/mariadb:/var/lib/mysql"

dbでここをマウントしてるから最低限親の_developmentがないと落ちるのかもしれない
_developmentに.gitkeepなり.gitignoreなりを置くとよさそうです

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working environment 環境構築 priority:LOW
Projects
None yet
Development

No branches or pull requests

2 participants