WolfDan
Ecto.migrate dont work on Umbrella Phoenix 1.3.0.rc.2
I’m using phoenix 1.3 with the umbrella tag, I have run this mix command to make the ecto schema:
mix phx.gen.schema Movie.movie movie_movies web_id:integer image:string name:string ori_name:string category:integer episodes:integer status:integer launch:date end:date broadcast:naive_datetime source:integer duration:time premier_temp:integer premier_year:integer
it generates without a problem, the schema files and migration file, but when I run ´mix ecto.migrate´ I get this:
21:07:12.507 [info] Already up
But when I see the database with navicat I just have a table empty called “schema_migrations”, I have run the mix ecto.migrate on every apps folder and main folder but still without work, is this a bug or my fault?
PD: I just run the schema command and after the mix ecto.migrate, I dont modify the files generated in any moment
Most Liked
hubertlepicki
I think the convention would be to leave controller in the _web app, along with all the webby stuff like: assets, views, templates and channels.
You would most likely want to move schema, and make sure it’s not namespaced under Foo.Web but Foo, i.e. rename Foo.Web.Movie to Foo.Movie if this is needed.
I do agree it is a problem/bug, most likely it’s not a finished feature.
hubertlepicki
I think I can see your problem. Your migrations (and I assume also the schemas) sit in the _web app. And, apparently, you used the new mix phx.new --umbrella generator that generates the main app, and _web app.
I think you ran the mix phx.gen.schema inside _web app. Which generated the files there. But this _web app has no Repo. Repo is inside the other, main app.
Unfortunately, the mix phx.gen.schema does not seem to work from within the main app (I think it probably will in final veersion of Phoenix 1.3). Which probably leaves you with only option to move the migrations and schema files to the main application, from _web application
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









