Comments (8)
created_at "timestamp default CURRENT_TIMESTAMP" [not null,note:'create time']
updated_at "timestamp default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP" [not null,note:'update time']
from dbml.
Ops, I am sorry as I think I have misled you. The original issue is with exporting to MYSQL from the dbdiagram.
I have just tested again to export syntax
created_at timestamp [default: `now()`]
the MYSQL syntax being exported is
`created_at` timestamp DEFAULT (now())
This will make MYSQL 5.7.18 to throw error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(now())
)'
Supported syntax is (without additional parenthesis wrapping the now())
`created_at` timestamp DEFAULT now()
from dbml.
Hi, i'm from Dbdiagram Team,
With now() you should wrap it between the backtick as `now()`
since 'now()'
will be exported as a string, not a function.
I'm testing the code created_at timestamp DEFAULT (now())
in MySQL 8.0.16 and it's working fine :D
About the import feature, the new version will be deployed within this week so stay tuned and this problem will be resolved ^^
Thanks for your feedback!
from dbml.
That would be awesome! Let us know when it's updated
from dbml.
Hi @cottonball97 , I have been reading up online and can't seem to find documentation on how to implement ON UPDATE CURRENT_TIMESTAMP using DbDiagram.
May you kindly share some Intel on how I can implement the ON update function?
your help will be highly appreciated/>
from dbml.
The new parser for import has been released! You can now import DEFAULT CURRENT_TIMESTAMP
& DEFAULT now()
smoothly :)
We did our best but it still seems to be buggy so please do give it another round and tell us if there's anything wrong happened to you. We're happy to help!
from dbml.
Hello, thanks for this handful tool, but I would like to point out that the issue is still unsolved for MySQL5.7 version
from dbml.
Yep, this is certainly still manifests on MySQL 5.6, which is still the most used version around. Please correct this: the docs claim that it will convert between DBML and MySQL no problem, but it certainly is not, at least in dbdiagram.io. I'm not sure if it is supposed to correspond 1:1 with latest DBML, but I'm not sure why it wouldn't be.
from dbml.
Related Issues (20)
- 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
- Cannot find module '../parse/databaseGenerator' HOT 7
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.