Comments (2)
Hi state303,
Due to an oversight, the fields order of composite primary keys is currently also the order in which the fields are defined in the table.
For your case, as a workaround, you can try changing the column order so that artist_id
is defined before url_hash
. Like this:
CREATE TABLE IF NOT EXISTS artist_url (
artist_id INTEGER NOT NULL CONSTRAINT fk_artist_url_artist_id_artist REFERENCES artist,
url_hash INTEGER NOT NULL,
url VARCHAR(2048) NOT NULL,
PRIMARY KEY (artist_id, url_hash)
);
from dbml.
Fixed in #416
from dbml.
Related Issues (20)
- Postgres: ALTER TABLE test ADD CONSTRAINT not converted to dbml HOT 1
- Add support for views HOT 2
- support of jsonb in postgresql HOT 2
- Implementing Generalization & specialization HOT 2
- [bug] incorrect table note parsing by dbml2sql HOT 2
- sql2dbml can not parse materialized views HOT 3
- Add support for gin indexes
- Website is down HOT 4
- How to have syntax highlighting on Intellij products? (WebStorm, etc.) HOT 5
- Unable to name constraints other than foreign keys HOT 1
- sql to dbml failed HOT 2
- add to monaco HOT 3
- Is there a UI that comes with the repo? HOT 1
- options for how dbml is exported HOT 1
- mssql ALTER TABLE HOT 1
- error with default value when using dump schema db from postgres HOT 2
- Postgresql parsing fail on function body: no viable alternative at input HOT 2
- Can it support other database? HOT 1
- Need support comment on mysql and another HOT 2
- Add more flexibility for data types 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 dbml.