D1 Best Practices dev/prod modes and --local and --remote flags
Hi!
What are best practices around databases with D1 for building web apps that have dev and prod modes?
I tried creating a wrangler.toml like this:
notice the ids are the same.
when I create migrations, I have to use --env=dev and --env=prod flags. But not I have duplicated migrations in the same folder.
What's the right way to do this? Should I have two databases in each env? A dev and a prod?
Or should I control using the --local and --remote flags somehow?
What are best practices around databases with D1 for building web apps that have dev and prod modes?
I tried creating a wrangler.toml like this:
notice the ids are the same.
when I create migrations, I have to use --env=dev and --env=prod flags. But not I have duplicated migrations in the same folder.
What's the right way to do this? Should I have two databases in each env? A dev and a prod?
Or should I control using the --local and --remote flags somehow?
