Comments (4)
Was there any progress on this concept?
from dbml.
Annotations might also help support database migrations #61.
I can imagine a few different annotations for migrations
- Renamed
Table users {
@Renamed(from="fullname")
name varchar
}
That way, once a migration command is ran to gennerate a migration script the tool knows not to drop the fullname
column and create a new name
, but instead to rename it (similarly for tables).
- DropOnMigration
@DropOnMigration
Table something_cache {
id varchar
last_updated date
}
Knows to always drop the table (or column) and recreate it on every migration.
- NotARenamed
Table users {
@Renamed(from="nickname")
name varchar
@NotARename
nickname varchar
}
Allows you when a migration is created to rename nickname
into the name
column, and then create a new nickname
column.
Then once a migration file is created you can go in and strip those annotations.
This is just one idea for how one could better support migrations, but I do like the idea of annotations to be able to extend dbml.
from dbml.
Maybe the dbml toolchain could have some sort of middleware layer where plugins could come in and announce which annotations they hook into and add additional abilities.
from dbml.
bump
from dbml.
Related Issues (20)
- cli: unable to parse mssql script with collate HOT 1
- Generate DBML from JS object HOT 4
- Can't generate DBML with a database having many-to-many relation HOT 2
- Contribution: Java-based Parser
- Allow DBML Includes/Imports to split large files and allow reuse
- DBML File formatter HOT 1
- problem with ref & sql generation HOT 1
- UUID Marked as a Syntax Error in MySQL Adapter HOT 1
- Can't reference capitalized types in export to Postgresql HOT 1
- Postgresql importer does not take into account PK when set on ALTER TABLE statement HOT 1
- dbml conversion error on CLI HOT 5
- importing posgresql function make import fail HOT 2
- dbml conversion error on CLI HOT 1
- It seems that `DELIMITER` cannot be handled well HOT 1
- Add integration for Drizzle ORM
- mysql import fails to escape trailing singlequotes in column comments
- Issue with multi-valued index expressions - sql2dbml mysql HOT 1
- Ability to import/include other DBML
- Workaround for column un-supported settings doesn't work HOT 1
- Can't use the library in reactjs HOT 6
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.