Comments (9)
Its an interesting idea, we could potentially do something like this by default. I think its reasonable that some migrations will have to have manual intervention, but this seems like something we could potentially detect and provide a better default for.
from ash_postgres.
Yeah, but a string is a valid jsonb
. So my point is even with USING column:jsonb
it will still not be an actual object under the hood.
from ash_postgres.
Yeah, exactly. Its possible that in the future we could do it with something interactive in cases we can detect an issue, but the juice is unlikely to be worth the squeeze.
from ash_postgres.
In this case, though, it would produce a jsonb string and not a map though.
from ash_postgres.
The migrations generator produced modify :settings, :jsonb
for me when I changed attribute type from string
to map
🤔
from ash_postgres.
Ah! I see what you mean.
I missed this because in my case I was storing Jason.encode
d strings anyway :) But if there were other strings, it would either fail, or would fail on read
🤔
No idea how to solve this properly besides generating warnings or comments during migration or when generating migrations.
from ash_postgres.
Yeah, I mean honestly thats what happens when you run the migrations, the data store tells you that you can't actually do that transition and have to figure out some other way to do what you want. I'm not sure if the migration generator should try to figure this one out since it can't know what the right answer is.
from ash_postgres.
I think we can't reliably do this kind of thing currently. Folks will need to edit the migrations themselves.
from ash_postgres.
awww shucks :(
Well, it will probably affect a very small number of migrations anyway, and the solution is quite easy.
from ash_postgres.
Related Issues (20)
- The maximum length of the index name is not considered HOT 2
- `Identity.where` is not working HOT 3
- Removing an attribute generates a migration with commented out changes, but snapshot with the changes HOT 5
- Handle the new Ecto parameterized type format
- Error thrown if relationship aggregate is used in update with atomic_update HOT 4
- Don't sort identity keys when creating unique indexes
- Updates from GraphQL broken
- Exceeding index limit gives confusing error message
- NaiveDateTime value breaks queries with Map type HOT 6
- Error when attempting to install ash_postgres using Igniter
- An action combining two change commands blows up HOT 1
- Table names generated by the generators should be pluralized
- `configure_runtime/3` runs on repeat installs HOT 2
- Tenant migrations won't run without --domains HOT 6
- Tenant is missing for `many_to_many` after recent update.
- Error when installing with Igniter - `Igniter.Project.Application.app_name/0 is undefined` HOT 5
- After update, getting ** (Protocol.UndefinedError) protocol Enumerable not implemented for false of type Atom HOT 2
- %KeyError{key: :__ash_bindings__} on filter expression HOT 1
- Ash.Type.NewType: A type defined as subtype_of: :ci_string leads to postgres error in read actions. Attribute is cast as ::ci_string instead of ::citext HOT 1
- first aggregate on NativeDateTime fails with Postgres version parsing HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ash_postgres.