Electron100 / butane

An ORM for Rust with a focus on simplicity and on writing Rust, not SQL
Apache License 2.0
83 stars 11 forks source link

Add test to unmigrate test models #252

Closed jayvdb closed 2 months ago

jayvdb commented 2 months ago

The error I get for pg is

thread 'unmigrate_pg' panicked at butane/tests/unmigrate.rs:15:42:
called `Result::unwrap()` on an `Err` value: Postgres(Error { kind: Db, cause: Some(DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState(E2BP01), message: "cannot drop table autoitem because other objects depend on it", detail: Some("constraint autopkwithmany_items_many_has_fkey on table autopkwithmany_items_many depends on table autoitem\nconstraint renamed_many_table_items_many_has_fkey on table renamed_many_table_items_many depends on table autoitem"), hint: Some("Use DROP ... CASCADE to drop the dependent objects too."), position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("dependency.c"), line: Some(1197), routine: Some("reportDependentObjects") }) })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace