Comments (2)
🤔 yeah, this is interesting. There is a way to add custom unique indexes to be checked in the changeset. Specifically:
postgres do
unique_index_names {[:provider, :provider_id], "...name of constraint"}
end
But we could likely derive these for custom constraints. The only thing is that we need to have atoms for the fields instead of strings, and we don't necessarily want to assume that every key provided to a custom index already exists as an atom.
So, to do this automatically we'd need to
- make custom_indexes take a list of
atom
for fields instead of strings - add those to the list of unique constraint names to check for.
from ash_postgres.
Fixed in: 0598376
from ash_postgres.
Related Issues (20)
- Migration script places unique index below relationships they're needed for HOT 1
- Warning shown unnecessarily when present validation specified in atomic action HOT 2
- `has_one` with `no_attributes? true` and `from_many? true` does not apply limiting to the query HOT 4
- Validation failing only with AshPostgres, works as expected without a data_layer HOT 2
- `ash_postgres.generate_migrations` does not create schemas HOT 1
- Relationships Should Offer Index Support HOT 9
- Using is_nil on relationship doesnt work in an and statement HOT 3
- potential out-of-order operations on table name change HOT 1
- `Nothing vs Restrict` section of the References topic needs an example HOT 1
- Renaming column name with index generates wrong migrations
- Add `ash_required/1` function in the `ash-functions` extension, and a mirrored `required!` function in ash expression syntax HOT 1
- Sorting by a calculation that performs a subquery raises an error HOT 4
- Switch to using `timestamp with time zone` by default
- Constraint migration generations ignore prefixes
- Returning notifications from a bulk destroy inside a bulk action raises an error HOT 1
- Regression installing ash_uuid extension HOT 1
- Polymorphic resource belongs_to relationship error HOT 1
- Using ref in a filter gives an error in ash 3 HOT 3
- Custom index unexpectedly dropped when upgrading to 2.0 HOT 8
- parent does not work from within an aggregate filter HOT 1
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.