generated from coop-cloud/example
fix: always migrate before start #11
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "arso/outline:dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi,
the current recipe failed to start for me. The app container kept dying in a loop, with errors about missing tables. Because both
app run
andapp cmd
require a running container, I couldn't run the migrate command that is mentioned in the README. A simple fix is to just always run the migrate command before starting. With this, the recipe works great for me.Thanks,
Frando
If running (potentially destructive) migrate commands on each start is considered bad practice, it could be toggled via an enironment variable maybe instead. I guess the migrate command can make downgrades impossible, so maybe it would be better to have it optional.
Is there a good way on how to check if the container is being started for the first time, to always run the migrate command in that case? Or it could check if the DB is empty.
LGTM, let's try it! Also, would be good to patch https://git.coopcloud.tech/coop-cloud/outline#post-deploy-migration explaining that it is done for you now.
@decentral1se I agree about docs, I also observe running
cmd app migrate
should be a no-op. Optimistically merged