Skip to content

v0.4.0

Choose a tag to compare

@SpaceShaman SpaceShaman released this 25 Jul 10:50
· 290 commits to master since this release

The new version of the project introduces several improvements and new features, focusing on defining unique constraints, enhancing database table management, and improving documentation. Here are the main changes:

New Features

  • Added support for defining unique constraints in database table columns.
  • Introduced the drop_table method in the DBModel class to drop a table from the database.

Tests

  • Added a test case in test_save.py to ensure that the uniqueness constraint work properly.
  • Added a test case for the drop_table method in test_remove_table.py.

Documentation

  • Updated README.md to include information on defining unique constraints.
  • Added instructions for deleting and updating tables in the README.md.
  • Updated Features and Roadmap checklist

Continuous Integration

  • Updated the coverage.yml to specify coverage for the ormagic package in the pytest command.

In summary, the new version brings support for unique constraints, new methods for managing database tables, and comprehensive updates to documentation and test coverage.

Features and Roadmap

  • Define table schema using Pydantic models
  • Basic CRUD operations
    • Save data to the database
    • Read data from the database
    • Update data in the database
    • Delete data from the database
  • Relationships between tables
    • One-to-many
      • Create a tables with a foreign key
      • Save data with a foreign key
      • Read data with a foreign key
      • Update data with a foreign key
      • Delete data with a foreign key
        • Cascade
        • Set null
        • Restrict
        • Set default
        • No action
    • One-to-one
    • Many-to-many
  • Unique constraints
  • Remove table
  • Update table schema
  • Filter data and retrieve multiple records
  • Custom primary key
  • Bulk operations (save, update, delete)
  • Migrations

Full Changelog: v0.3.0...v0.4.0