Skip to content

Implement SQLite migration system #32

@anitnilay20

Description

@anitnilay20

Description

Add migration system for SQLite with SQLite-specific DDL limitations and workarounds.

Requirements

  • SQLite DDL operations (CREATE, DROP)
  • ALTER TABLE limitations handling
  • Table recreation for complex changes
  • Index management
  • Foreign key support
  • Write comprehensive tests

Acceptance Criteria

  • SQLite migration support with limitations handled
  • Table recreation for unsupported ALTER operations
  • Proper foreign key handling
  • Index management

Files to create

  • beatrix_core/src/relational/migrations/sqlite.rs

Example Usage

Migration::new("add_user_column")
    .alter_table("users", |table| {
        table.add_column("phone", "TEXT");
    })
    .run(&db).await?; // Handles table recreation if needed

Metadata

Metadata

Assignees

No one assigned

    Labels

    high-priorityHigh priority itemmigrationsDatabase migrationssqliteSQLite database support

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions