WolfDan

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

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

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

Where Next?

Popular in Questions Top

gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lists...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
vac
Hi, I’m quite new in Elixir and I’m trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and I...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

Other popular topics Top

WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29703 241
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 54250 245
New

We're in Beta

About us Mission Statement