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

fix: Fixed DbmlExporter and other type Exporters to export DEFAULT consistently #654

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Mrxyy
Copy link
Contributor

@Mrxyy Mrxyy commented Nov 1, 2024

When using dbmlExporter, if field.dbdefault.type is not set, a value of "DEFAULT " will appear. However, other Exporters will directly use field.dbdefault.type. I think it needs to be consistent.
.e.g:
MysqlExporter
image
OracleExporter
image
PostgresExporter
image

Summary

  • Short summary of the task, what have been done etc
  • Please include screenshots whenever possible (important).

Issue

(issue link here)

Lasting Changes (Technical)

(please list down: code changes/things that have wide-effect; new libraries/functions added that can be used by others; examples below)

  • (Added class EmailValidator to validate email address' validity)
  • (Added Tenant#is_trial? check)

Checklist

Please check directly on the box once each of these are done

  • Documentation (if necessary)
  • Tests (integration test/unit test)
  • Integration Tests Passed
  • Code Review

…nsistently

When using dbmlExporter, if field.dbdefault.type is not set, a value of "DEFAULT  <null value>" will appear. However, other Exporters will directly use field.dbdefault.type. I think it needs to be consistent.
@Mrxyy Mrxyy changed the title fix: Fixed DbmlExporter and other type Exporters to export DEFAULT co… fix: Fixed DbmlExporter and other type Exporters to export DEFAULT consistently Nov 1, 2024
@NQPhuc
Copy link
Contributor

NQPhuc commented Nov 4, 2024

Hi @Mrxyy,

Thank you for contributing to dbml!

To help with getting this PR merged, kindly assist in:

  • Make sure the unit tests passed
  • Add a test for dbdefault that cover your deafult type case. For this PR, I think you should add the test in packages/dbml-core/__test__/model_exporter/dbml_exporter/input/default_tables.in.json.

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

Successfully merging this pull request may close these issues.

2 participants