Yes, you need to dump a schema that contains the structure you want. This 
is also true of rake db:schema:dump.

On Wednesday, August 10, 2016 at 5:03:41 PM UTC-4, David Escobar wrote:
>
> I just found this helpful blog post on the best practice for these new 
> Ecto Mix tasks, so posting here for reference. Thanks.
>
> https://www.devmynd.com/blog/getting-a-schema-file-from-elixirs-ecto/
>
>
> On Thursday, January 21, 2016 at 6:26:48 PM UTC-8, David Escobar wrote:
>>
>> Hi everyone, I come from a Ruby and Rails background, and I'm currently 
>> using Phoenix with Ecto.
>>
>> In Rails, we have a Rake task for recreating the entire database schema 
>> on new systems:
>> *rake db:schema:load*
>>
>> As it says in the auto-generated *schema.rb*, this is better than 
>> running all existing migrations from scratch as errors may accumulate over 
>> time, particularly if there are any specific data migrations. Performance 
>> is also a consideration after a while.
>>
>> There doesn't seem to be an equivalent way to do this in Ecto. There is 
>> only *mix ecto.migrate*. Is there an equivalent way of just loading the 
>> schema as in Rails? Thanks.
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-talk/3a183a70-ae9f-40e2-9b83-ba6537b078d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to