juliolinarez
Are default timestamps not allowed to be null in the database layer?
I realized that Ash generates timestamps in the application, which is what I want. To be sure, I removed the default values for those fields in the database migration. However, now when I run mix ash_postgres.generate_migrations, it wants to add a default value back in the snapshot files.
How can I prevent this?
attributes do
attribute :id, :uuid do
primary_key? true
allow_nil? false
default &UUIDv7.generate/0
end
attribute :title, :string do
allow_nil? false
end
attribute :content, :string do
allow_nil? false
end
create_timestamp :inserted_at
update_timestamp :updated_at
end
Is there a way to prevent that globally?
Thank for this amazing framework ![]()
Im using: ash 3.5.33, ash_postgres: 2.6.14, phoenix:1.7.21
First Post!
Last Post!
zachdaniel
Creator of Ash
Yeah ultimately it should be safe to have it in both places, and acts as a benefit for retaining application behavior even when data is inserted directly into the database.
0
Popular in Discussions
Following https://github.com/tbrand/which_is_the_fastest |>
https://raw.githubusercontent.com/tbrand/which_is_the_fastest/master/imgs...
New
Hey everyone,
this has been brewing in my head some time and it came up again while reading Adopting Elixir.
GenServers, supervisors et...
New
If this has been asked here before, please point me to where it was asked as I didn’t find it when I searched the forum. Maybe a mailing ...
New
This is a post to discuss the new Phoenix LiveView functionality.
From Chris’s talk, it appears that they generate all HTML on the serve...
New
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help.
Where are they similar?
Where do they differ the m...
New
I have a sample string
sentence = "Hello, world ... 123 *** ^%&*())^% %%:>"
From this string, I want to only keep the integers, ...
New
Hi everyone, im working on find best language/framework/system for
high concurrency, high performance and stable performance
after wor...
New
Other popular topics
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!)
This post collects co...
New
I am trying to run a deploy with docker and I successfully runned with this command:
docker build -t romenigld/blog-prod .
but when I t...
New
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
Latest Ash Threads
Chat & Discussions>Discussions
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
- #hex
- #security











