{"owner":"SeaQL","repo":"sea-orm","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["CLAUDE.md"],"skills":{"CLAUDE.md":"# SeaORM Project Guidelines\n\nThis project uses **SeaORM 2.0**. AI models likely have SeaORM 1.0 in their training data -- some patterns have changed. Always follow the 2.0 patterns shown below.\n\n## Quick Reference Links\n\n- [Walk-through of SeaORM 2.0](https://www.sea-ql.org/blog/2025-12-05-sea-orm-2.0/)\n- [Migration Guide (1.0 to 2.0)](https://www.sea-ql.org/blog/2026-01-12-sea-orm-2.0/)\n- [New Entity Format](https://www.sea-ql.org/blog/2025-10-20-sea-orm-2.0/)\n- [Strongly-Typed Column](https://www.sea-ql.org/blog/2025-11-11-sea-orm-2.0/)\n- [Nested ActiveModel](https://www.sea-ql.org/blog/2025-11-25-sea-orm-2.0/)\n- [Entity First Workflow](https://www.sea-ql.org/blog/2025-10-30-sea-orm-2.0/)\n\n## Entity Definition (2.0 Format)\n\nIn SeaORM 2.0, entities use `#[sea_orm::model]` with relations defined directly on the `Model` struct. This replaces the 1.0 pattern of separate `Relation` enums and `Related` trait impls.\n\n```rust\nmod user {\n    use sea_orm::entity::prelude::*;\n\n    #[sea_orm::model]\n    #[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]\n    #[sea_orm(table_name = \"user\")]\n    pub struct Model {\n        #[sea_orm(primary_key)]\n        pub id: i32,\n        pub name: String,\n        #[sea_orm(unique)]\n        pub email: String,\n        #[sea_orm(has_one)]\n        pub profile: HasOne<super::profile::Entity>,\n        #[sea_orm(has_many)]\n        pub posts: HasMany<super::post::Entity>,\n    }\n\n    impl ActiveModelBehavior for ActiveModel {}\n}\n```\n\n### Relation Attributes\n\n```rust\n// Has-One\n#[sea_orm(has_one)]\npub profile: HasOne<super::profile::Entity>,\n\n// Has-Many\n#[sea_orm(has_many)]\npub posts: HasMany<super::post::Entity>,\n\n// Belongs-To (explicit foreign key mapping)\n#[sea_orm(belongs_to, from = \"user_id\", to = \"id\")]\npub user: BelongsTo<super::user::Entity>,\n\n// Many-to-Many via junction table\n#[sea_orm(has_many, via = \"post_tag\")]\npub tags: HasMany<super::tag::Entity>,\n\n// Self-referential\n#[sea_orm(self_ref, via = \"user_follower\", from = \"User\", to = \"Follower\")]\npub followers: HasMany<Entity>,\n```\n\n### Junction Table (Composite Primary Key)\n\n```rust\n#[sea_orm::model]\n#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]\n#[sea_orm(table_name = \"post_tag\")]\npub struct Model {\n    #[sea_orm(primary_key, auto_increment = false)]\n    pub post_id: i32,\n    #[sea_orm(primary_key, auto_increment = false)]\n    pub tag_id: i32,\n    #[sea_orm(belongs_to, from = \"post_id\", to = \"id\")]\n    pub post: BelongsTo<super::post::Entity>,\n    #[sea_orm(belongs_to, from = \"tag_id\", to = \"id\")]\n    pub tag: BelongsTo<super::tag::Entity>,\n}\n```\n\n## Strongly-Typed Columns (2.0)\n\nUse `COLUMN` constant with typed fields instead of the untyped `Column` enum:\n\n```rust\n// 2.0 (preferred) -- compile-time type safety\nuser::Entity::find().filter(user::COLUMN.name.contains(\"Bob\"))\n\n// 1.0 (outdated) -- still works but prefer COLUMN\nuser::Entity::find().filter(user::Column::Name.contains(\"Bob\"))\n```\n\n## ActiveModel Builder Pattern (2.0)\n\n```rust\n// Create with nested relations\nlet bob = user::ActiveModel::builder()\n    .set_name(\"Bob\")\n    .set_email(\"bob@sea-ql.org\")\n    .set_profile(profile::ActiveModel::builder().set_picture(\"Tennis\"))\n    .insert(db)\n    .await?;\n\n// Add has-many children\nlet mut bob = bob.into_active_model();\nbob.posts.push(\n    post::ActiveModel::builder().set_title(\"My first post\")\n);\nbob.save(db).await?;\n\n// Many-to-many\nlet post = post::ActiveModel::builder()\n    .set_title(\"A sunny day\")\n    .set_user_id(bob.id)\n    .add_tag(existing_tag)\n    .add_tag(tag::ActiveModel::builder().set_tag(\"outdoor\"))\n    .save(db)\n    .await?;\n```\n\n## Entity Loader API (2.0)\n\n```rust\n// Load with relations in a single query\nlet bob = user::Entity::load()\n    .filter_by_email(\"bob@sea-ql.org\")\n    .with(profile::Entity)\n    .with(post::Entity)\n    .one(db)\n    .await?\n    .expect(\"Not found\");\n\n// Nested relations (post -> comments)\nlet user = user::Entity::load()\n    .filter_by_id(12)\n    .with(profile::Entity)\n    .with((post::Entity, comment::Entity))\n    .one(db)\n    .await?;\n```\n\n## Schema Registry (Entity-First Workflow)\n\n```rust\n// Auto-create tables from entity definitions (dev/testing)\ndb.get_schema_registry(\"my_crate::*\")\n    .sync(db)\n    .await?;\n```\n\n## Anti-Patterns -- DO NOT DO THESE\n\n### 1. Do not specify `column_type` on custom wrapper types\n\nWhen using `DeriveValueType` for custom types, the column type is inferred automatically from the inner type. Adding `column_type` is redundant and incorrect:\n\n```rust\n// WRONG -- do not annotate column_type on custom types\n#[sea_orm(column_type = \"Decimal(Some((10, 4)))\")]\npub speed: Speed,\n\n// CORRECT -- SeaORM infers the column type from the DeriveValueType inner type\npub speed: Speed,\n\n#[derive(Clone, Debug, PartialEq, DeriveValueType)]\npub struct Speed(Decimal);\n```\n\n### 2. Use `Text` or explicit max length for long strings on MySQL/MSSQL\n\nOn MySQL and MSSQL, `String` maps to `VARCHAR(255)` by default. For strings that may exceed 255 characters, use `Text` or specify `StringLen::Max`:\n\n```rust\n// WRONG on MySQL/MSSQL -- silently truncates at 255 chars\npub description: String,\n\n// CORRECT -- use column_type for longer strings\n#[sea_orm(column_type = \"Text\")]\npub description: String,\n\n// Also correct -- explicit max length\n#[sea_orm(column_type = \"String(StringLen::Max)\")]\npub event_type: String,\n```\n\nNote: Postgre / SQLite uses unbounded string by default, so this is primarily a MySQL/MSSQL concern.\n\n### 3. Missing `ExprTrait` import\n\nMethods like `.eq()`, `.like()`, `.contains()` on `Expr` require the trait import in 2.0:\n\n```rust\nuse sea_orm::ExprTrait; // required in 2.0\n\nExpr::col((self.entity_name(), *self)).like(s)\n```\n\n### 4. Do not use removed or renamed APIs\n\n| 1.0 (removed/renamed) | 2.0 (correct) |\n|---|---|\n| `.into_condition()` | `.into()` |\n| `db.execute(Statement::from_sql_and_values(..))` | `db.execute_raw(Statement::from_sql_and_values(..))` |\n| `db.query_all(backend.build(&query))` | `db.query_all(&query)` |\n| `Alias::new(\"col\")` for static strings | `Expr::col(\"col\")` directly |\n| `insert_many(..).on_empty_do_nothing()` | `insert_many([])` returns `None` safely |\n\n### 5. Do not manually impl traits that `DeriveValueType` now generates\n\nIn 2.0, `DeriveValueType` auto-generates `NotU8`, `IntoActiveValue`, and `TryFromU64`. Remove manual implementations to avoid conflicts.\n\n### 6. PostgreSQL: `serial` is no longer the default\n\nAuto-increment columns now use `GENERATED BY DEFAULT AS IDENTITY`. If you need legacy `serial` behavior, use feature flag `option-postgres-use-serial` or `.custom(\"serial\")`.\n\n### 7. SQLite: integer type mapping changed\n\nBoth `Integer` and `BigInteger` map to `integer` in 2.0. The entity generator produces `i64` by default. Override with `sea-orm-cli --big-integer-type=i32` if needed.\n"},"files":{"CLAUDE.md":"# SeaORM Project Guidelines\n\nThis project uses **SeaORM 2.0**. AI models likely have SeaORM 1.0 in their training data -- some patterns have changed. Always follow the 2.0 patterns shown below.\n\n## Quick Reference Links\n\n- [Walk-through of SeaORM 2.0](https://www.sea-ql.org/blog/2025-12-05-sea-orm-2.0/)\n- [Migration Guide (1.0 to 2.0)](https://www.sea-ql.org/blog/2026-01-12-sea-orm-2.0/)\n- [New Entity Format](https://www.sea-ql.org/blog/2025-10-20-sea-orm-2.0/)\n- [Strongly-Typed Column](https://www.sea-ql.org/blog/2025-11-11-sea-orm-2.0/)\n- [Nested ActiveModel](https://www.sea-ql.org/blog/2025-11-25-sea-orm-2.0/)\n- [Entity First Workflow](https://www.sea-ql.org/blog/2025-10-30-sea-orm-2.0/)\n\n## Entity Definition (2.0 Format)\n\nIn SeaORM 2.0, entities use `#[sea_orm::model]` with relations defined directly on the `Model` struct. This replaces the 1.0 pattern of separate `Relation` enums and `Related` trait impls.\n\n```rust\nmod user {\n    use sea_orm::entity::prelude::*;\n\n    #[sea_orm::model]\n    #[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]\n    #[sea_orm(table_name = \"user\")]\n    pub struct Model {\n        #[sea_orm(primary_key)]\n        pub id: i32,\n        pub name: String,\n        #[sea_orm(unique)]\n        pub email: String,\n        #[sea_orm(has_one)]\n        pub profile: HasOne<super::profile::Entity>,\n        #[sea_orm(has_many)]\n        pub posts: HasMany<super::post::Entity>,\n    }\n\n    impl ActiveModelBehavior for ActiveModel {}\n}\n```\n\n### Relation Attributes\n\n```rust\n// Has-One\n#[sea_orm(has_one)]\npub profile: HasOne<super::profile::Entity>,\n\n// Has-Many\n#[sea_orm(has_many)]\npub posts: HasMany<super::post::Entity>,\n\n// Belongs-To (explicit foreign key mapping)\n#[sea_orm(belongs_to, from = \"user_id\", to = \"id\")]\npub user: BelongsTo<super::user::Entity>,\n\n// Many-to-Many via junction table\n#[sea_orm(has_many, via = \"post_tag\")]\npub tags: HasMany<super::tag::Entity>,\n\n// Self-referential\n#[sea_orm(self_ref, via = \"user_follower\", from = \"User\", to = \"Follower\")]\npub followers: HasMany<Entity>,\n```\n\n### Junction Table (Composite Primary Key)\n\n```rust\n#[sea_orm::model]\n#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]\n#[sea_orm(table_name = \"post_tag\")]\npub struct Model {\n    #[sea_orm(primary_key, auto_increment = false)]\n    pub post_id: i32,\n    #[sea_orm(primary_key, auto_increment = false)]\n    pub tag_id: i32,\n    #[sea_orm(belongs_to, from = \"post_id\", to = \"id\")]\n    pub post: BelongsTo<super::post::Entity>,\n    #[sea_orm(belongs_to, from = \"tag_id\", to = \"id\")]\n    pub tag: BelongsTo<super::tag::Entity>,\n}\n```\n\n## Strongly-Typed Columns (2.0)\n\nUse `COLUMN` constant with typed fields instead of the untyped `Column` enum:\n\n```rust\n// 2.0 (preferred) -- compile-time type safety\nuser::Entity::find().filter(user::COLUMN.name.contains(\"Bob\"))\n\n// 1.0 (outdated) -- still works but prefer COLUMN\nuser::Entity::find().filter(user::Column::Name.contains(\"Bob\"))\n```\n\n## ActiveModel Builder Pattern (2.0)\n\n```rust\n// Create with nested relations\nlet bob = user::ActiveModel::builder()\n    .set_name(\"Bob\")\n    .set_email(\"bob@sea-ql.org\")\n    .set_profile(profile::ActiveModel::builder().set_picture(\"Tennis\"))\n    .insert(db)\n    .await?;\n\n// Add has-many children\nlet mut bob = bob.into_active_model();\nbob.posts.push(\n    post::ActiveModel::builder().set_title(\"My first post\")\n);\nbob.save(db).await?;\n\n// Many-to-many\nlet post = post::ActiveModel::builder()\n    .set_title(\"A sunny day\")\n    .set_user_id(bob.id)\n    .add_tag(existing_tag)\n    .add_tag(tag::ActiveModel::builder().set_tag(\"outdoor\"))\n    .save(db)\n    .await?;\n```\n\n## Entity Loader API (2.0)\n\n```rust\n// Load with relations in a single query\nlet bob = user::Entity::load()\n    .filter_by_email(\"bob@sea-ql.org\")\n    .with(profile::Entity)\n    .with(post::Entity)\n    .one(db)\n    .await?\n    .expect(\"Not found\");\n\n// Nested relations (post -> comments)\nlet user = user::Entity::load()\n    .filter_by_id(12)\n    .with(profile::Entity)\n    .with((post::Entity, comment::Entity))\n    .one(db)\n    .await?;\n```\n\n## Schema Registry (Entity-First Workflow)\n\n```rust\n// Auto-create tables from entity definitions (dev/testing)\ndb.get_schema_registry(\"my_crate::*\")\n    .sync(db)\n    .await?;\n```\n\n## Anti-Patterns -- DO NOT DO THESE\n\n### 1. Do not specify `column_type` on custom wrapper types\n\nWhen using `DeriveValueType` for custom types, the column type is inferred automatically from the inner type. Adding `column_type` is redundant and incorrect:\n\n```rust\n// WRONG -- do not annotate column_type on custom types\n#[sea_orm(column_type = \"Decimal(Some((10, 4)))\")]\npub speed: Speed,\n\n// CORRECT -- SeaORM infers the column type from the DeriveValueType inner type\npub speed: Speed,\n\n#[derive(Clone, Debug, PartialEq, DeriveValueType)]\npub struct Speed(Decimal);\n```\n\n### 2. Use `Text` or explicit max length for long strings on MySQL/MSSQL\n\nOn MySQL and MSSQL, `String` maps to `VARCHAR(255)` by default. For strings that may exceed 255 characters, use `Text` or specify `StringLen::Max`:\n\n```rust\n// WRONG on MySQL/MSSQL -- silently truncates at 255 chars\npub description: String,\n\n// CORRECT -- use column_type for longer strings\n#[sea_orm(column_type = \"Text\")]\npub description: String,\n\n// Also correct -- explicit max length\n#[sea_orm(column_type = \"String(StringLen::Max)\")]\npub event_type: String,\n```\n\nNote: Postgre / SQLite uses unbounded string by default, so this is primarily a MySQL/MSSQL concern.\n\n### 3. Missing `ExprTrait` import\n\nMethods like `.eq()`, `.like()`, `.contains()` on `Expr` require the trait import in 2.0:\n\n```rust\nuse sea_orm::ExprTrait; // required in 2.0\n\nExpr::col((self.entity_name(), *self)).like(s)\n```\n\n### 4. Do not use removed or renamed APIs\n\n| 1.0 (removed/renamed) | 2.0 (correct) |\n|---|---|\n| `.into_condition()` | `.into()` |\n| `db.execute(Statement::from_sql_and_values(..))` | `db.execute_raw(Statement::from_sql_and_values(..))` |\n| `db.query_all(backend.build(&query))` | `db.query_all(&query)` |\n| `Alias::new(\"col\")` for static strings | `Expr::col(\"col\")` directly |\n| `insert_many(..).on_empty_do_nothing()` | `insert_many([])` returns `None` safely |\n\n### 5. Do not manually impl traits that `DeriveValueType` now generates\n\nIn 2.0, `DeriveValueType` auto-generates `NotU8`, `IntoActiveValue`, and `TryFromU64`. Remove manual implementations to avoid conflicts.\n\n### 6. PostgreSQL: `serial` is no longer the default\n\nAuto-increment columns now use `GENERATED BY DEFAULT AS IDENTITY`. If you need legacy `serial` behavior, use feature flag `option-postgres-use-serial` or `.custom(\"serial\")`.\n\n### 7. SQLite: integer type mapping changed\n\nBoth `Integer` and `BigInteger` map to `integer` in 2.0. The entity generator produces `i64` by default. Override with `sea-orm-cli --big-integer-type=i32` if needed.\n"},"items":[{"name":"CLAUDE.md","path":"CLAUDE.md","title":"CLAUDE.md","content":"# SeaORM Project Guidelines\n\nThis project uses **SeaORM 2.0**. AI models likely have SeaORM 1.0 in their training data -- some patterns have changed. Always follow the 2.0 patterns shown below.\n\n## Quick Reference Links\n\n- [Walk-through of SeaORM 2.0](https://www.sea-ql.org/blog/2025-12-05-sea-orm-2.0/)\n- [Migration Guide (1.0 to 2.0)](https://www.sea-ql.org/blog/2026-01-12-sea-orm-2.0/)\n- [New Entity Format](https://www.sea-ql.org/blog/2025-10-20-sea-orm-2.0/)\n- [Strongly-Typed Column](https://www.sea-ql.org/blog/2025-11-11-sea-orm-2.0/)\n- [Nested ActiveModel](https://www.sea-ql.org/blog/2025-11-25-sea-orm-2.0/)\n- [Entity First Workflow](https://www.sea-ql.org/blog/2025-10-30-sea-orm-2.0/)\n\n## Entity Definition (2.0 Format)\n\nIn SeaORM 2.0, entities use `#[sea_orm::model]` with relations defined directly on the `Model` struct. This replaces the 1.0 pattern of separate `Relation` enums and `Related` trait impls.\n\n```rust\nmod user {\n    use sea_orm::entity::prelude::*;\n\n    #[sea_orm::model]\n    #[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]\n    #[sea_orm(table_name = \"user\")]\n    pub struct Model {\n        #[sea_orm(primary_key)]\n        pub id: i32,\n        pub name: String,\n        #[sea_orm(unique)]\n        pub email: String,\n        #[sea_orm(has_one)]\n        pub profile: HasOne<super::profile::Entity>,\n        #[sea_orm(has_many)]\n        pub posts: HasMany<super::post::Entity>,\n    }\n\n    impl ActiveModelBehavior for ActiveModel {}\n}\n```\n\n### Relation Attributes\n\n```rust\n// Has-One\n#[sea_orm(has_one)]\npub profile: HasOne<super::profile::Entity>,\n\n// Has-Many\n#[sea_orm(has_many)]\npub posts: HasMany<super::post::Entity>,\n\n// Belongs-To (explicit foreign key mapping)\n#[sea_orm(belongs_to, from = \"user_id\", to = \"id\")]\npub user: BelongsTo<super::user::Entity>,\n\n// Many-to-Many via junction table\n#[sea_orm(has_many, via = \"post_tag\")]\npub tags: HasMany<super::tag::Entity>,\n\n// Self-referential\n#[sea_orm(self_ref, via = \"user_follower\", from = \"User\", to = \"Follower\")]\npub followers: HasMany<Entity>,\n```\n\n### Junction Table (Composite Primary Key)\n\n```rust\n#[sea_orm::model]\n#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]\n#[sea_orm(table_name = \"post_tag\")]\npub struct Model {\n    #[sea_orm(primary_key, auto_increment = false)]\n    pub post_id: i32,\n    #[sea_orm(primary_key, auto_increment = false)]\n    pub tag_id: i32,\n    #[sea_orm(belongs_to, from = \"post_id\", to = \"id\")]\n    pub post: BelongsTo<super::post::Entity>,\n    #[sea_orm(belongs_to, from = \"tag_id\", to = \"id\")]\n    pub tag: BelongsTo<super::tag::Entity>,\n}\n```\n\n## Strongly-Typed Columns (2.0)\n\nUse `COLUMN` constant with typed fields instead of the untyped `Column` enum:\n\n```rust\n// 2.0 (preferred) -- compile-time type safety\nuser::Entity::find().filter(user::COLUMN.name.contains(\"Bob\"))\n\n// 1.0 (outdated) -- still works but prefer COLUMN\nuser::Entity::find().filter(user::Column::Name.contains(\"Bob\"))\n```\n\n## ActiveModel Builder Pattern (2.0)\n\n```rust\n// Create with nested relations\nlet bob = user::ActiveModel::builder()\n    .set_name(\"Bob\")\n    .set_email(\"bob@sea-ql.org\")\n    .set_profile(profile::ActiveModel::builder().set_picture(\"Tennis\"))\n    .insert(db)\n    .await?;\n\n// Add has-many children\nlet mut bob = bob.into_active_model();\nbob.posts.push(\n    post::ActiveModel::builder().set_title(\"My first post\")\n);\nbob.save(db).await?;\n\n// Many-to-many\nlet post = post::ActiveModel::builder()\n    .set_title(\"A sunny day\")\n    .set_user_id(bob.id)\n    .add_tag(existing_tag)\n    .add_tag(tag::ActiveModel::builder().set_tag(\"outdoor\"))\n    .save(db)\n    .await?;\n```\n\n## Entity Loader API (2.0)\n\n```rust\n// Load with relations in a single query\nlet bob = user::Entity::load()\n    .filter_by_email(\"bob@sea-ql.org\")\n    .with(profile::Entity)\n    .with(post::Entity)\n    .one(db)\n    .await?\n    .expect(\"Not found\");\n\n// Nested relations (post -> comments)\nlet user = user::Entity::load()\n    .filter_by_id(12)\n    .with(profile::Entity)\n    .with((post::Entity, comment::Entity))\n    .one(db)\n    .await?;\n```\n\n## Schema Registry (Entity-First Workflow)\n\n```rust\n// Auto-create tables from entity definitions (dev/testing)\ndb.get_schema_registry(\"my_crate::*\")\n    .sync(db)\n    .await?;\n```\n\n## Anti-Patterns -- DO NOT DO THESE\n\n### 1. Do not specify `column_type` on custom wrapper types\n\nWhen using `DeriveValueType` for custom types, the column type is inferred automatically from the inner type. Adding `column_type` is redundant and incorrect:\n\n```rust\n// WRONG -- do not annotate column_type on custom types\n#[sea_orm(column_type = \"Decimal(Some((10, 4)))\")]\npub speed: Speed,\n\n// CORRECT -- SeaORM infers the column type from the DeriveValueType inner type\npub speed: Speed,\n\n#[derive(Clone, Debug, PartialEq, DeriveValueType)]\npub struct Speed(Decimal);\n```\n\n### 2. Use `Text` or explicit max length for long strings on MySQL/MSSQL\n\nOn MySQL and MSSQL, `String` maps to `VARCHAR(255)` by default. For strings that may exceed 255 characters, use `Text` or specify `StringLen::Max`:\n\n```rust\n// WRONG on MySQL/MSSQL -- silently truncates at 255 chars\npub description: String,\n\n// CORRECT -- use column_type for longer strings\n#[sea_orm(column_type = \"Text\")]\npub description: String,\n\n// Also correct -- explicit max length\n#[sea_orm(column_type = \"String(StringLen::Max)\")]\npub event_type: String,\n```\n\nNote: Postgre / SQLite uses unbounded string by default, so this is primarily a MySQL/MSSQL concern.\n\n### 3. Missing `ExprTrait` import\n\nMethods like `.eq()`, `.like()`, `.contains()` on `Expr` require the trait import in 2.0:\n\n```rust\nuse sea_orm::ExprTrait; // required in 2.0\n\nExpr::col((self.entity_name(), *self)).like(s)\n```\n\n### 4. Do not use removed or renamed APIs\n\n| 1.0 (removed/renamed) | 2.0 (correct) |\n|---|---|\n| `.into_condition()` | `.into()` |\n| `db.execute(Statement::from_sql_and_values(..))` | `db.execute_raw(Statement::from_sql_and_values(..))` |\n| `db.query_all(backend.build(&query))` | `db.query_all(&query)` |\n| `Alias::new(\"col\")` for static strings | `Expr::col(\"col\")` directly |\n| `insert_many(..).on_empty_do_nothing()` | `insert_many([])` returns `None` safely |\n\n### 5. Do not manually impl traits that `DeriveValueType` now generates\n\nIn 2.0, `DeriveValueType` auto-generates `NotU8`, `IntoActiveValue`, and `TryFromU64`. Remove manual implementations to avoid conflicts.\n\n### 6. PostgreSQL: `serial` is no longer the default\n\nAuto-increment columns now use `GENERATED BY DEFAULT AS IDENTITY`. If you need legacy `serial` behavior, use feature flag `option-postgres-use-serial` or `.custom(\"serial\")`.\n\n### 7. SQLite: integer type mapping changed\n\nBoth `Integer` and `BigInteger` map to `integer` in 2.0. The entity generator produces `i64` by default. Override with `sea-orm-cli --big-integer-type=i32` if needed.\n","category":"root","tokens":1702}]}