Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Syntax in DBML Export for dbdiagram.io & Incorrect File Extension #9

Open
jawahar2003 opened this issue Feb 14, 2025 · 1 comment

Comments

@jawahar2003
Copy link

Description

When converting a Laravel database schema to DBML format using php artisan dbml:parse, two issues occur:

Incorrect Syntax in Default Values

  • The generated DBML contains:
    id bigint [not null, default: 'nextval('users_id_seq'::regclass)']
    
  • This causes errors in dbdiagram.io due to nested single quotes.

Fix:

  • Using double quotes resolves the issue:
    id bigint [not null, default: "nextval('users_id_seq'::regclass)"]
    

Incorrect File Extension

  • The exported file is saved as .txt instead of .dbml.
  • Expected behavior: It should be .dbml for compatibility with DBML tools.
@aphisitworachorch
Copy link
Owner

I will fix ASAP, Thanks for Open an Issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants