My understanding is that running deploy:cold is typically a one-time
setup operation, so there would be no data to nuke. If I'm wrong it
wouldn't be the first time.
Perhaps I'm missing something obvious, is it common practice to add
data to your application via migrations (something that would be
skipped by simply running the schema.rb file)? Maybe there are other
reasons to prefer migration from zero to loading the schema.rb file
directly during the initial setup of your app?
I will look into patching the deploy:cold behavior for my own project,
I guess my situation is somewhat abnormal. I know that if I don't fix
it the admin team will have my head.
Cheers,
Andrew Kappen
On May 23, 3:45 pm, "David Masover" <
d...@3mix.com> wrote:
> It seems like it'd be pretty easy to do, though you might have to override
> the deploy:cold task.
>
> However, I think the reason for the current behavior is that loading the
> schema nukes whatever data was there. Using migrations is a sane default, in
> that it preserves data. The only way I can think to improve it would be to
> detect when none of the tables exist, and run db:schema:load in that
> instance -- and migrate if any tables exist.
>