Skip to content

Releases: SeaQL/sea-orm

1.1.5

14 Feb 09:06
ab6d983
Compare
Choose a tag to compare

New Features

  • Added Schema::json_schema_from_entity to construct a schema description in json for the given Entity

1.1.4

10 Jan 15:38
795ad20
Compare
Choose a tag to compare

Enhancements

  • Allow modifying the connection in migrations #2397
  • DeriveRelatedEntity proc_macro use async-graphql re-exported by seaography #2469

1.1.3

24 Dec 00:57
Compare
Choose a tag to compare

New Features

  • [sea-orm-codegen] register seaography entity modules & active enums #2403
pub mod prelude;

pub mod sea_orm_active_enums;

pub mod baker;
pub mod bakery;
pub mod cake;
pub mod cakes_bakers;
pub mod customer;
pub mod lineitem;
pub mod order;

seaography::register_entity_modules!([
    baker,
    bakery,
    cake,
    cakes_bakers,
    customer,
    lineitem,
    order,
]);

seaography::register_active_enums!([
    sea_orm_active_enums::Tea,
    sea_orm_active_enums::Color,
]);

Enhancements

  • Insert many allow active models to have different column set #2433
// this previously panics
let apple = cake_filling::ActiveModel {
    cake_id: ActiveValue::set(2),
    filling_id: ActiveValue::NotSet,
};
let orange = cake_filling::ActiveModel {
    cake_id: ActiveValue::NotSet,
    filling_id: ActiveValue::set(3),
};
assert_eq!(
    Insert::<cake_filling::ActiveModel>::new()
        .add_many([apple, orange])
        .build(DbBackend::Postgres)
        .to_string(),
    r#"INSERT INTO "cake_filling" ("cake_id", "filling_id") VALUES (2, NULL), (NULL, 3)"#,
);
  • [sea-orm-cli] Added MIGRATION_DIR environment variable #2419
  • Added ColumnDef::is_unique #2401
  • Postgres: quote schema in search_path #2436

Bug Fixes

  • MySQL: fix transaction isolation level not respected when used with access mode #2450

1.1.2

02 Dec 07:03
afdf9bb
Compare
Choose a tag to compare

Enhancements

  • Added ColumnTrait::enum_type_name() to signify enum types #2415
  • Added DbBackend::boolean_value() for database dependent boolean value #2415

1.1.1

04 Nov 01:12
Compare
Choose a tag to compare

Enhancements

  • [sea-orm-macros] impl From<Model> for ActiveModel instead of impl From<<Entity as sea_orm::EntityTrait>::Model> for ActiveModel #2349.
    Now the following can compile:
use sea_orm::{tests_cfg::cake, Set};

struct Cake {
    id: i32,
    name: String,
}

impl From<Cake> for cake::ActiveModel {
    fn from(value: Cake) -> Self {
        Self {
            id: Set(value.id),
            name: Set(value.name),
        }
    }
}

1.1.0

15 Oct 06:45
0c5668d
Compare
Choose a tag to compare

Enhancements

  • [sea-orm-macros] Call EnumIter::get using fully qualified syntax #2321
  • Construct DatabaseConnection directly from sqlx::PgPool, sqlx::SqlitePool and sqlx::MySqlPool #2348
  • [sea-orm-migration] Add pk_uuid schema helper #2329
  • [sea-orm-migration] Allow custom and custom_null schema helper to take column name and alias of different IntoIden types #2326
  • Add ColumnDef::get_column_default getter #2387

Upgrades

  • Upgrade sqlx to 0.8.2 #2305, #2371
  • Upgrade bigdecimal to 0.4 #2305
  • Upgrade sea-query to 0.32.0-rc #2305
  • Upgrade sea-query-binder to 0.7.0-rc #2305
  • Upgrade sea-schema to 0.16.0-rc #2305
  • Upgrade ouroboros to 0.18 #2353

House keeping

1.1.0-rc.3

08 Oct 03:51
c359ee3
Compare
Choose a tag to compare
1.1.0-rc.3 Pre-release
Pre-release

Enhancements

  • Add ColumnDef::get_column_default getter #2387

1.1.0-rc.2

04 Oct 09:57
c64f48d
Compare
Choose a tag to compare
1.1.0-rc.2 Pre-release
Pre-release

Enhancements

  • [sea-orm-macros] Call EnumIter::get using fully qualified syntax #2321
  • Construct DatabaseConnection directly from sqlx::PgPool, sqlx::SqlitePool and sqlx::MySqlPool #2348
  • [sea-orm-migration] Add pk_uuid schema helper #2329
  • [sea-orm-migration] Allow custom and custom_null schema helper to take column name and alias of different IntoIden types #2326

Upgrades

  • Upgrade sqlx to 0.8.2 #2371
  • Upgrade ouroboros to 0.18 #2353

House keeping

1.0.1

27 Aug 08:50
e3ae0c1
Compare
Choose a tag to compare

New Features

  • Added ConnectOptions::connect_lazy for creating DB connection pools without establishing connections up front #2268

Breaking Changes

  • Changed ProxyDatabaseTrait methods to async. It's a breaking change, but it should have been part of the 1.0 release.
    The feature is behind the feature guard proxy, and we believe it shouldn't impact majority of users.
    #2278

Bug Fixes

  • [sea-orm-codegen] Fix ColumnType to Rust type resolution #2313

1.1.0-rc.1

09 Aug 15:51
9d5e3ee
Compare
Choose a tag to compare
1.1.0-rc.1 Pre-release
Pre-release

Upgrades

  • Upgrade sqlx to 0.8 #2305
  • Upgrade bigdecimal to 0.4 #2305
  • Upgrade sea-query to 0.32.0-rc #2305
  • Upgrade sea-query-binder to 0.7.0-rc #2305
  • Upgrade sea-schema to 0.16.0-rc #2305