zulkris

zulkris

Ecto dont creates table but migration success

Hi all! for clarify i upload all to github
to start:
docker-compose up -d
inside container (via docker exec -it app sh), im trying migrate via mix ecto.migrate

migration “successfully” migrates:

❯ docker exec -it app sh
/spool/services/poller_dal $ mix ecto.rollback
21:56:56.054 [info]  == Running 20230224150122 PollerDal.Repo.Migrations.CreateDistricts.change/0 backward
21:56:56.056 [info]  == Migrated 20230224150122 in 0.0s
/spool/services/poller_dal $ mix ecto.migrate
21:57:01.036 [info]  == Running 20230224150122 PollerDal.Repo.Migrations.CreateDistricts.change/0 forward
21:57:01.038 [info]  == Migrated 20230224150122 in 0.0s

but new table not creates

P.S.: in schema_migrations successfully added new line that this migration migrates “ok”

Marked As Solved

muelthe

muelthe

It looks to me like your migration file is empty.

There’s some good reference here in the docs for building a migration file: Ecto.Migration — Ecto SQL v3.14.0

Also, you might find the following useful when you create your schemas: mix phx.gen.schema — Phoenix v1.6.4

This particular mix task will create and populate the migration file as well (edit: along with the schema of course :slight_smile: ).

Also Liked

zulkris

zulkris

wow, i see its real empty in repo… O____O i understood))

this file under ReadOnly rights until it creates via mix ecto.gen.migration xxxx and he starts under root under container =) i see modified version, but i have no rights…

thanks a lot)) so simple…

Where Next?

Popular in Questions Top

9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
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
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
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
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New

Other popular topics Top

9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
Nvim
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help. Where are they similar? Where do they differ the m...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
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
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New

We're in Beta

About us Mission Statement