- Fix: escaping single quotes in a column's default value. Thanks @ryanproback for the contribution
- Fix: TableGroup and Project name are now safely quoted on render. Thanks @ryanproback for reporting
- Fix: line breaks in column and index options are now allowed. Thanks @aardjon for reporting
- Fix: table elements order is now not enforced by the parser. Thanks @aardjon for reporting
- New: TableGroup now can have notes (DBML v.3.7.2)
- New: TableGroup now can have color (DBML v.3.7.4)
- New: SQL and DBML renderers can now be supplied to parser
- New: SQL and DBML rendering rewritten tow support external renderers
- New: allow unicode characters in identifiers (DBML v3.3.0)
- New: support for arbitrary table and column properties (#37)
- Fix: allow pk in named indexes (thanks @pierresouchay for the contribution)
- New: Sticky notes syntax (DBML v3.2.0)
- Fix: Table header color was not rendered in
dbml()
(thanks @tristangrebot for the contribution) - New: allow array column types (DBML v3.1.0)
- New: allow double quotes in expressions (DBML v3.1.2)
- Fix: recursion in object equality check
- New: don't allow duplicate refs even if they have different inline method (DBML v3.1.6)
- Fix: enum collision from different schemas. Thanks @ewdurbin for the contribution
- Fix: (#27) allowing comments after Tables, Enums, etc. Thanks @marktaff for reporting
- Fix: removing indentation bug
- Fix: (#26) bug in note empty line stripping, thanks @Jaschenn for reporting
- New: get_references_for_sql table method
- Fix: junction table now has the schema of the first referenced table (as introduced in DBML 2.4.3)
- Fix: typing issue which failed for Python 3.8 and Python 3.9
- New: referenced tables in SQL are now defined first in SQL (#23 reported by @minhl)
- Fix: single quotes were not escaped in column notes (#24 reported by @fivegrant)
- Fix: inline many-to-many references were not rendered in sql
- New: "backslash newline" is supported in note text (line continuation)
- New: notes have reference to their parent. Note.sql now depends on type of parent (for tables and columns it's COMMENT ON clause)
- New: pydbml no longer splits long notes into multiple lines
- Fix: inline ref schema bug, thanks to @jens-koster
- Fix: (#16) notes were not idempotent, thanks @jens-koster for reporting
- Fix: (#15) note objects were not supported in project definition, thanks @jens-koster for reporting
- Fix: (#20) schema didn't work in table group definition, thanks @mjfii for reporting
- Fix: quotes in note text broke sql and dbml
- New: proper support of composite primary keys without creating an index
- New: support of many-to-many relationships
- Fixed setup.py, thanks to @vosskj03.
- New project architecture, full support for creating and editing DBML. See details in Upgrading to PyDBML 1.0.0
- New Expression class
- Support DBML 2.4.1 syntax:
- Multiline comments
- Multiple schemas
- Fix: after editing column name index dbml was not updated.
- Fix: enums with spaces in name were not applied.
- Fix: after editing column name table dict was not updated.
- Fix: after editing enum column type was not updated.
- Removed EnumType class. Only Enum is used now.
- Reworked
__repr__
and__str__
methods on all classes. They are now much simplier and more readable. - Comments on classes are now rendered as SQL comments in
sql
property (previously notes were rendered as comments on some classes). - Notes on
Table
andColumn
classes are rendered as SQL comments insql
property:COMMENT ON TABLE "x" is 'y'
. - New:
dbml
property on most classes and on parsed results which returns the DBML code. - Fix: sql for Reference and TableReference.
- New: Support composite references. Breaks backward compatibility!
col1
,col2
attributes onReference
andcol
,ref_col
attributes onTableReference
are now lists ofColumn
instead ofColumn
. TableGroup
now holds references to actual tables.
- New: Support references by aliases.
- New: Support indexes with expressions.
- New: You can now compare SQLObjects of same class.
- New: Add check for duplicate references on a table.
- Fix: minor bug fixes.
- Notes are now added as comments in SQL for tables, table columns, indeces, enums.
- Fix: bug in TableReference
- Fix: if schema had newline or comment at the end, it crashed parser
- Fix TableReference sql
- Fix: files in UTF-8 with BOM encoding couldn't be parsed.
- More tests and more bug fixes.
- Added index columns validation.
- Added table group items validation.
- References now contain link to Table and Column objects instead of just names.
- Indexes now contain link to Column objects instead of just names.
- Better syntax errors.
- sql for each object now contains in
sql
property instead of string rerpresentation. Added proper string representations. - Added syntax tests.
- Million bugs fixed after testing.
- Comments are now parsed too if they are before [b] or on the same line [l] as the entity. Works for: tables[b], columns[lb], references [lb], indexes[lb], enum items [lb], enums [b], project [b] and table group [b]
- All class instances will now have an empty Note in
note
attribute instead of None. - Add string representation for Note and EnumItem.
- Enum instance now acts like list of EnumItems.
- Add EnumType to use in column.type attribute.
- Column type is now replaced by EnumType instance if enum with such name is defined.
- Remove unnecessary ColumnType class.
- Fix: note definition, project definition, some other definitions
- Initial release