# Checklist — prisma-engines sql-migration-tests Source: prisma/prisma-engines@e922089b7d7502aff4249d5da3420f6fa55fc6ad — schema-engine/sql-migration-tests/tests/ Protocol: each line is one source test. `[ ]` = not yet dispositioned. The Opus reviewer sub-agent checks `[x]` ONLY when satisfied that the test is (a) faithfully ported and passing, (b) faithfully ported as `test.fails` with a `failing.md` entry, or (c) covered by a justified individual `non-ported.md` entry. Implementer sub-agents never check boxes. ### schema-engine/sql-migration-tests/tests/apply_migrations/mod.rs - [ ] `apply_migrations::apply_migrations_with_an_empty_migrations_folder_works` — apply_migrations on an empty migrations folder applies nothing [connectors: all] - [ ] `apply_migrations::applying_a_single_migration_should_work` — creates then applies one migration, asserts it applied and re-apply is a no-op [connectors: all] - [ ] `apply_migrations::multi_schema_applying_two_migrations_works` — multi-schema namespaces, applies two sequential migrations, asserts both applied then idempotent re-apply [connectors: tags:mssql,postgres] - [ ] `apply_migrations::multi_schema_two_migrations_drop_fks` — multi-schema migration moving FK relations across schemas with existing data, asserts second migration applies cleanly [connectors: tags:mssql] - [ ] `apply_migrations::multi_schema_two_migrations_reset` — multi-schema migrations then reset(namespaces), asserts tables are gone after reset [connectors: tags:mssql] - [ ] `apply_migrations::applying_two_migrations_works` — applies two sequential migrations, asserts both applied then idempotent re-apply [connectors: all] - [ ] `apply_migrations::migrations_should_fail_when_the_script_is_invalid` — apply_migrations with an invalid SQL script fails with expected user-facing error and marks second migration failed [connectors: all] - [ ] `apply_migrations::migrations_should_not_reapply_modified_migrations` — modifying an already-applied migration file does not cause reapplication [connectors: all] - [ ] `apply_migrations::migrations_should_fail_on_an_uninitialized_nonempty_database` — apply_migrations on a nonempty, uninitialized database fails with DatabaseSchemaNotEmpty error [connectors: all] - [ ] `apply_migrations::migrations_should_succeed_on_an_uninitialized_nonempty_database_with_postgis_tables` — apply_migrations succeeds on nonempty database containing only PostGIS system tables [connectors: tags:postgres] - [ ] `apply_migrations::applying_a_single_migration_multi_file_should_work` — creates and applies a multi-file migration, asserts applied and re-apply is a no-op [connectors: all] ### schema-engine/sql-migration-tests/tests/create_migration/create_migration_tests.rs - [ ] `create_migration::create_migration_tests::basic_create_migration_works` — create_migration renders expected CreateTable SQL per connector for a simple model [connectors: all] - [ ] `create_migration::create_migration_tests::basic_create_migration_multi_file_works` — create_migration_multi_file renders expected CreateTable SQL for two models split across files [connectors: all] - [ ] `create_migration::create_migration_tests::creating_a_second_migration_should_have_the_previous_sql_schema_as_baseline` — second create_migration diffs against prior migration's schema, renders only the new table [connectors: all] - [ ] `create_migration::create_migration_tests::bad_migrations_should_make_the_command_fail_with_a_good_error` — create_migration on a directory with an invalid existing migration.sql fails with a syntax error [connectors: all] - [ ] `create_migration::create_migration_tests::empty_migrations_should_not_be_created` — create_migration with no schema change does not create a new migration directory [connectors: all] - [ ] `create_migration::create_migration_tests::migration_name_length_is_validated` — create_migration accepts an overly long migration name and still creates one directory [connectors: all] - [ ] `create_migration::create_migration_tests::empty_migrations_should_be_created_with_the_draft_option` — draft(true) create_migration creates an empty migration even with no schema change [connectors: all] - [ ] `create_migration::create_migration_tests::creating_a_migration_with_a_non_existent_migrations_directory_should_work` — create_migration works when the migrations directory was deleted beforehand [connectors: all] - [ ] `create_migration::create_migration_tests::create_enum_step_only_rendered_when_needed` — create_migration renders CreateEnum step only for connectors that support enums natively [connectors: tags:mysql,postgres] - [ ] `create_migration::create_migration_tests::create_enum_renders_correctly` — create_migration renders CreateEnum + CreateTable SQL for postgres [connectors: tags:postgres; exclude:cockroachdb] - [ ] `create_migration::create_migration_tests::unsupported_type_renders_correctly` — create_migration renders an Unsupported("point") column type correctly [connectors: tags:postgres; exclude:cockroachdb] - [ ] `create_migration::create_migration_tests::no_additional_unique_created` — create_migration for 1:1 relation using shared id does not add a redundant unique constraint [connectors: tags:postgres; exclude:cockroachdb] - [ ] `create_migration::create_migration_tests::create_constraint_name_tests_w_implicit_names` — create_migration renders default/implicit constraint and index names per connector [connectors: exclude:vitess] - [ ] `create_migration::create_migration_tests::create_constraint_name_tests_w_explicit_names` — create_migration renders explicit @map/map: constraint and index names per connector [connectors: exclude:sqlite,vitess] - [ ] `create_migration::create_migration_tests::alter_constraint_name` — create_migration renders RenameIndex/RenameForeignKey/AlterTable steps when only constraint names change [connectors: exclude:mysql (non-windows)] - [ ] `create_migration::create_migration_tests::alter_constraint_name_and_alter_columns_at_same_time` — create_migration combines AddColumn and constraint-rename into one AlterTable step [connectors: exclude:mysql,sqlite,mssql] - [ ] `create_migration::create_migration_tests::create_migration_with_empty_name_has_timestamp_directory` — create_migration with empty name generates a 14-digit timestamp-only directory name [connectors: all] ### schema-engine/sql-migration-tests/tests/errors/database_access_denied.rs - [ ] `errors::database_access_denied::database_access_denied_must_return_a_proper_error_in_rpc` — creates a low-privilege MySQL user and connects as it to an inaccessible database, asserts P1010 "User was denied access" error with correct database_name meta [connectors: tags:mysql57; exclude:vitess] ### schema-engine/sql-migration-tests/tests/errors/error_tests.rs - [ ] `errors::error_tests::authentication_failure_must_return_a_known_error_on_postgres` — connects with a wrong password on Postgres, asserts connection_error maps to P1000 authentication-failed error with correct database_user meta [connectors: tags:postgres12] - [ ] `errors::error_tests::authentication_failure_must_return_a_known_error_on_mysql` — connects with a wrong password on MySQL, asserts P1000 authentication-failed error with correct database_user meta [connectors: tags:mysql; exclude:vitess] - [ ] `errors::error_tests::authentication_failure_must_return_a_known_error_on_mssql` — connects with a wrong password on MSSQL (via JDBC connection string), asserts P1000 authentication-failed error with correct database_user meta [connectors: tags:mssql] - [ ] `errors::error_tests::unreachable_database_must_return_a_proper_error_on_mysql` — connects to an unreachable port on MySQL, asserts P1001 "Can't reach database server" error with correct host:port meta [connectors: tags:mysql] - [ ] `errors::error_tests::unreachable_database_must_return_a_proper_error_on_postgres` — connects to an unreachable port on Postgres, asserts P1001 "Can't reach database server" error with correct host:port meta [connectors: tags:postgres12] - [ ] `errors::error_tests::database_does_not_exist_must_return_a_proper_error` — connects to a nonexistent MySQL database name, asserts P1003 "Database does not exist" error with correct database_name meta [connectors: tags:mysql; exclude:vitess] - [ ] `errors::error_tests::database_does_not_exist_must_return_a_proper_error_in_vitess` — connects to a nonexistent database on Vitess, asserts P1003 error reports "(not available)" as the database name [connectors: tags:vitess] - [ ] `errors::error_tests::bad_datasource_url_and_provider_combinations_must_return_a_proper_error` — uses a Postgres connection string with provider set to "sqlite", asserts P1013 invalid-database-string error mentioning the required `file:` protocol [connectors: tags:postgres] - [ ] `errors::error_tests::connections_to_system_databases_must_be_rejected` — attempts to connect to MySQL system databases (default/mysql/sys/performance_schema), asserts each yields P3004 "system database" rejection error with correct database_name meta [connectors: tags:mysql8] - [ ] `errors::error_tests::datamodel_parser_errors_must_return_a_known_error` — pushes a schema referencing an undeclared type "Post", asserts P1012 datamodel-parser error with the exact rendered diagnostic message [connectors: tags:sqlite] - [ ] `errors::error_tests::unique_constraint_errors_in_migrations_must_return_a_known_error` — seeds duplicate values then force-pushes a @unique constraint, asserts P2002 unique-constraint-violation error with connector-specific message/target (fields vs constraint name vs "(not available)") [connectors: all; exclude:cockroachdb,sqlite] - [ ] `errors::error_tests::json_fields_must_be_rejected_on_mysql_5_6` — pushes a schema with a Json field on MySQL 5.6, asserts P1015 "unsupported feature for database version" error mentioning Json is unsupported on MySQL 5.6 [connectors: tags:mysql56] - [ ] `errors::error_tests::connection_string_problems_give_a_nice_error` — builds connection strings with an unescaped `#` in the password for mysql/postgresql/sqlserver providers, asserts each yields P1013 invalid-connection-string error with provider-specific parse-failure details [connectors: n/a (tokio::test)] - [ ] `errors::error_tests::missing_datasource_url_gives_proper_error` — calls ensure_connection_validity with no datasource URL configured, asserts the error message reports "No URL defined in the configured datasource" [connectors: n/a (tokio::test)] - [ ] `errors::error_tests::diff_from_empty_schema_to_datamodel_should_not_require_url` — runs a schema-only diff (Empty to SchemaDatamodel) with no datasource URL set, asserts the diff succeeds without requiring a database connection [connectors: n/a (tokio::test)] ### schema-engine/sql-migration-tests/tests/evaluate_data_loss/evaluate_data_loss_tests.rs - [ ] `evaluate_data_loss::evaluate_data_loss_tests::evaluate_data_loss_with_an_up_to_date_database_returns_no_step` — evaluate_data_loss on an up-to-date database returns zero steps, warnings, unexecutables [connectors: all] - [ ] `evaluate_data_loss::evaluate_data_loss_tests::evaluate_data_loss_with_up_to_date_db_and_pending_changes_returns_steps` — evaluate_data_loss with up-to-date db and pending schema change returns 1 step, no warnings [connectors: all] - [ ] `evaluate_data_loss::evaluate_data_loss_tests::evaluate_data_loss_with_not_up_to_date_db_and_pending_changes_returns_the_right_steps` — evaluate_data_loss with unapplied migration and pending schema change returns 1 step, no warnings [connectors: all] - [ ] `evaluate_data_loss::evaluate_data_loss_tests::evaluate_data_loss_with_past_unapplied_migrations_with_destructive_changes_does_not_warn_for_these` — evaluate_data_loss does not warn again for destructive changes from already-created but unapplied migrations [connectors: caps:enums] - [ ] `evaluate_data_loss::evaluate_data_loss_tests::evaluate_data_loss_returns_warnings_for_the_local_database_for_the_next_migration` — evaluate_data_loss reports drop-table warning and unexecutable-required-column step together with correct step count [connectors: all] - [ ] `evaluate_data_loss::evaluate_data_loss_tests::evaluate_data_loss_maps_warnings_to_the_right_steps` — evaluate_data_loss maps warnings and unexecutable messages to correct step indices across multiple model changes [connectors: caps:enums] - [ ] `evaluate_data_loss::evaluate_data_loss_tests::evaluate_data_loss_multi_file_maps_warnings_to_the_right_steps` — multi-file evaluate_data_loss maps warnings and unexecutable messages to correct step indices [connectors: caps:enums] ### schema-engine/sql-migration-tests/tests/existing_data/mod.rs - [ ] `existing_data::dropping_a_table_with_rows_should_warn` — schema_push dropping a nonempty table warns and executes no steps [connectors: all] - [ ] `existing_data::dropping_a_table_with_rows_multi_file_should_warn` — multi-file schema_push dropping a nonempty table warns and executes no steps [connectors: all] - [ ] `existing_data::dropping_a_column_with_non_null_values_should_warn` — schema_push dropping a column with non-null values warns and executes no steps [connectors: all] - [ ] `existing_data::altering_a_column_without_non_null_values_should_not_warn` — schema_push altering an all-null column's type produces no warning and executes steps [connectors: all] - [ ] `existing_data::altering_a_column_with_non_null_values_should_warn` — schema_push casting a non-null column's type warns per-connector and executes no steps [connectors: all] - [ ] `existing_data::column_defaults_can_safely_be_changed` — schema_push changing a column default across combinations preserves existing row values [connectors: exclude:cockroachdb] - [ ] `existing_data::changing_a_column_from_required_to_optional_should_work` — schema_push making a required column optional executes and preserves data [connectors: all] - [ ] `existing_data::changing_a_column_from_optional_to_required_is_unexecutable` — schema_push making an optional column required with existing NULLs is unexecutable and preserves data [connectors: exclude:sqlite] - [ ] `existing_data::dropping_a_table_referenced_by_foreign_keys_must_work` — forced schema_push dropping a table referenced by an FK succeeds and removes the FK [connectors: exclude:vitess] - [ ] `existing_data::string_columns_do_not_get_arbitrarily_migrated` — schema_push adding an unrelated column does not disturb existing string column values [connectors: all] - [ ] `existing_data::altering_the_type_of_a_column_in_an_empty_table_should_not_warn` — schema_push changing a column type on an empty table produces no warning [connectors: all] - [ ] `existing_data::making_a_column_required_in_an_empty_table_should_not_warn` — schema_push making a column required on an empty table produces no warning [connectors: all] - [ ] `existing_data::enum_variants_can_be_added_without_data_loss` — schema_push adding an enum variant preserves existing enum-typed row data [connectors: tags:mysql,postgres; exclude:vitess] - [ ] `existing_data::enum_variants_can_be_dropped_without_data_loss` — forced schema_push dropping an unused enum variant warns and preserves existing row data [connectors: tags:mysql,postgres; exclude:vitess] - [ ] `existing_data::set_default_current_timestamp_on_existing_column_works` — forced schema_push adding now() default to an existing datetime column executes without warning [connectors: all] - [ ] `existing_data::primary_key_migrations_do_not_cause_data_loss` — forced schema_push changing a composite PK column type warns and preserves referencing row data [connectors: exclude:cockroachdb,vitess] ### schema-engine/sql-migration-tests/tests/existing_data/sql_unexecutable_migrations/added_required_field_to_table.rs - [ ] `existing_data::sql_unexecutable_migrations::added_required_field_to_table::adding_a_required_field_to_an_existing_table_with_data_without_a_default_is_unexecutable` — schema_push adding required column without default to nonempty table is unexecutable, data preserved [connectors: all] - [ ] `existing_data::sql_unexecutable_migrations::added_required_field_to_table::adding_a_required_field_with_prisma_level_default_works` — schema_push adding required column with prisma-level-only default to nonempty table is unexecutable, data preserved [connectors: all] - [ ] `existing_data::sql_unexecutable_migrations::added_required_field_to_table::adding_a_required_field_with_a_default_to_an_existing_table_works` — schema_push adding required column with a DB-level default to nonempty table executes and backfills data [connectors: all] - [ ] `existing_data::sql_unexecutable_migrations::added_required_field_to_table::adding_a_required_field_without_default_to_an_existing_table_without_data_works` — schema_push adding required column without default to an empty table executes successfully [connectors: all] ### schema-engine/sql-migration-tests/tests/existing_data/sql_unexecutable_migrations/added_unimplementable_unique_constraint.rs - [ ] `existing_data::sql_unexecutable_migrations::added_unimplementable_unique_constraint::adding_a_unique_constraint_should_warn` — schema_push adding unique constraint over duplicate values warns, data preserved [connectors: all] - [ ] `existing_data::sql_unexecutable_migrations::added_unimplementable_unique_constraint::dropping_enum_values_should_warn` — schema_push dropping an in-use enum value warns, data preserved [connectors: tags:mysql,postgres; exclude:vitess] - [ ] `existing_data::sql_unexecutable_migrations::added_unimplementable_unique_constraint::adding_a_unique_constraint_when_existing_data_respects_it_works` — forced schema_push adding unique constraint over already-unique values warns but data preserved [connectors: all] ### schema-engine/sql-migration-tests/tests/existing_data/sql_unexecutable_migrations/made_optional_field_required.rs - [ ] `existing_data::sql_unexecutable_migrations::made_optional_field_required::making_an_optional_field_required_with_data_without_a_default_is_unexecutable` — schema_push making optional column required without default, existing NULLs, is unexecutable [connectors: all] - [ ] `existing_data::sql_unexecutable_migrations::made_optional_field_required::making_an_optional_field_required_with_data_with_a_default_works` — forced schema_push (sqlite) making optional column required with a default backfills NULLs [connectors: tags:sqlite] - [ ] `existing_data::sql_unexecutable_migrations::made_optional_field_required::making_an_optional_field_required_with_data_with_a_default_is_unexecutable` — schema_push making optional column required with a default, existing NULLs, is unexecutable on non-sqlite connectors [connectors: exclude:sqlite] - [ ] `existing_data::sql_unexecutable_migrations::made_optional_field_required::making_an_optional_field_required_on_an_empty_table_works` — schema_push making optional column required on an empty table executes successfully [connectors: all] ### schema-engine/sql-migration-tests/tests/existing_data/sqlite_existing_data_tests.rs - [ ] `existing_data::sqlite_existing_data_tests::changing_a_column_from_optional_to_required_with_a_default_is_safe` — forced schema_push on sqlite making optional column required with a default is executable and preserves data [connectors: tags:sqlite] ### schema-engine/sql-migration-tests/tests/existing_data/type_migration_tests.rs - [ ] `existing_data::type_migration_tests::altering_the_type_of_a_column_in_a_non_empty_table_warns` — schema_push casting BigInt to Int on nonempty table warns per-connector and preserves the row [connectors: all] - [ ] `existing_data::type_migration_tests::migrating_a_required_column_from_int_to_string_should_cast` — schema_push casting Int to String column executes and casts existing row data [connectors: all] - [ ] `existing_data::type_migration_tests::changing_a_string_array_column_to_scalar_is_fine` — forced schema_push converting a String[] column to scalar String casts array to string representation [connectors: caps:scalarlists] - [ ] `existing_data::type_migration_tests::changing_an_int_array_column_to_scalar_is_not_possible` — forced schema_push converting an Int[] column to scalar Int is unexecutable, array column and data preserved [connectors: caps:scalarlists] - [ ] `existing_data::type_migration_tests::int_to_string_conversions_work` — schema_push casting Int to String column executes and casts existing row data [connectors: exclude:cockroachdb] - [ ] `existing_data::type_migration_tests::string_to_int_conversions_are_risky` — forced schema_push casting String to Int column is unexecutable on postgres, warns-and-executes on mysql/mssql/sqlite [connectors: exclude:cockroachdb] - [ ] `existing_data::type_migration_tests::datetime_to_float_conversions_are_impossible` — schema_push casting DateTime to Float warns of drop-and-recreate data loss; forced push executes and loses original data [connectors: exclude:mysql,sqlite,cockroachdb] ### schema-engine/sql-migration-tests/tests/initialization/mod.rs - [ ] `initialization::connecting_to_a_postgres_database_with_missing_schema_creates_it` — connects to Postgres with a not-yet-existing schema name via ensure_connection_validity, asserts the schema gets auto-created (pg_namespace row exists afterward) [connectors: tags:postgres] - [ ] `initialization::ipv6_addresses_are_supported_in_connection_strings` — rewrites the connection string host to an IPv6 literal ([::1]) and calls ensure_connection_validity, asserts the connection succeeds [connectors: all; exclude:sqlite] ### schema-engine/sql-migration-tests/tests/introspection/mod.rs - [ ] `introspection::introspect_force_with_invalid_schema` — introspects (force=true) a SQLite table against a schema containing an unknown attribute, asserts the emitted datamodel replaces the invalid model with an auto-generated @@ignore'd model matching the DB table [connectors: n/a (plain #[test])] - [ ] `introspection::introspect_no_force_with_invalid_schema` — introspects (force=false) the same invalid-schema/table combination, asserts introspection fails with the "@unknownAttributeThisIsNotValid" attribute-not-known parser diagnostic [connectors: n/a (plain #[test])] ### schema-engine/sql-migration-tests/tests/migrations/advisory_locking.rs - [ ] `migrations::advisory_locking::advisory_locking_works` — runs apply_migrations concurrently from three separate engine instances against the same migrations directory, asserts exactly one engine applies the migration while the other two see empty results (advisory lock serialization) [connectors: all; exclude:cockroachdb] ### schema-engine/sql-migration-tests/tests/migrations/basic.rs - [ ] `migrations::basic::adding_an_id_field_of_type_int_with_autoincrement_works` — schema_push an autoincrement Int id, asserts sequence (Postgres) or auto-increment column behavior [connectors: exclude:cockroachdb] - [ ] `migrations::basic::adding_multiple_optional_fields_to_an_existing_model_works` — schema_push adding two optional fields to an existing model, asserts columns are nullable [connectors: all] - [ ] `migrations::basic::a_model_can_be_removed` — create_migration/apply_migrations removing a related Post model, asserts applied migrations and empty diagnose_migration_history output [connectors: all] - [ ] `migrations::basic::adding_a_scalar_field_must_work` — schema_push a model with every scalar type, asserts column count/type families and idempotent re-push [connectors: all] - [ ] `migrations::basic::adding_an_optional_field_must_work` — schema_push an optional String field, asserts default None and nullable [connectors: all] - [ ] `migrations::basic::adding_an_optional_datetime_field_must_work` — schema_push an optional db.Timestamp DateTime field, asserts default None and nullable [connectors: tags:mysql] - [ ] `migrations::basic::adding_an_id_field_with_a_special_name_must_work` — schema_push an id field with a non-default name, asserts column exists [connectors: all] - [ ] `migrations::basic::adding_an_id_field_of_type_int_must_work` — schema_push a plain Int id, asserts no auto-increment [connectors: exclude:sqlite] - [ ] `migrations::basic::adding_an_id_field_of_type_int_must_work_for_sqlite` — schema_push a plain Int id on SQLite, asserts column auto-increments [connectors: tags:sqlite] - [ ] `migrations::basic::removing_a_scalar_field_must_work` — schema_push removing a String field, asserts column count drops from 2 to 1 [connectors: all] - [ ] `migrations::basic::update_type_of_scalar_field_must_work` — schema_push changing a field's type from String to Int, asserts resulting column type [connectors: all] - [ ] `migrations::basic::updating_db_name_of_a_scalar_field_must_work` — schema_push changing a @map'd column name, asserts old name gone and new name present [connectors: all] - [ ] `migrations::basic::reordering_and_altering_models_at_the_same_time_works` — schema_push reordering fields/models and renaming relations simultaneously, asserts green push [connectors: exclude:vitess] - [ ] `migrations::basic::switching_databases_must_work` — schema_push the same schema against two different SQLite connection strings, asserts green push on each [connectors: tags:sqlite] - [ ] `migrations::basic::renaming_a_datasource_works` — schema_push renaming the datasource block name, asserts green and no-steps push [connectors: tags:sqlite] - [ ] `migrations::basic::created_at_does_not_get_arbitrarily_migrated` — schema_push a DateTime @default(now()) column, inserts a row, re-pushes and asserts default kind Now and no steps [connectors: exclude:cockroachdb] - [ ] `migrations::basic::basic_compound_primary_keys_must_work` — schema_push a compound @@id, asserts primary key columns [connectors: all] - [ ] `migrations::basic::compound_primary_keys_on_mapped_columns_must_work` — schema_push a compound @@id on @map'd columns, asserts primary key uses mapped column names [connectors: all] - [ ] `migrations::basic::adding_a_primary_key_must_work` — schema_push adding @id to an existing column, asserts primary key constraint name [connectors: exclude:sqlite,mysql] ### schema-engine/sql-migration-tests/tests/migrations/basic/vitess.rs - [ ] `migrations::basic::vitess::reordering_and_altering_models_at_the_same_time_works` — schema_push reordering fields/models and renaming relations with onDelete/onUpdate Restrict on Vitess, asserts green push [connectors: tags:vitess] ### schema-engine/sql-migration-tests/tests/migrations/cockroachdb.rs - [ ] `migrations::cockroachdb::db_push_on_cockroach_db_with_postgres_provider_fails` — schema_push against a cockroachdb connection using a schema declaring provider "postgresql" fails with a provider-mismatch message [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::soft_resets_work_on_cockroachdb` — creates a table and view via raw_cmd then verifies a soft reset drops all tables while assert_schema confirms table count [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::cockroach_apply_migrations_errors` — apply_migrations on a migration referencing a nonexistent table fails with a database error pointing at the failing statement [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::native_type_columns_can_be_created` — schema_push creates a table with every native column type mapping and asserts each column's full_data_type, then reapplies with no further steps [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::moving_the_pk_to_an_existing_unique_constraint_works` — schema_push moves the primary key from a single id column onto an existing unique(a,b,c) constraint and asserts the new pk columns [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::primary_key_column_type_migrations_are_unexecutable` — changing a composite PK column's type with existing data produces an unexecutable-migration warning and leaves the schema unchanged [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::bigint_primary_keys_are_idempotent` — repeated schema_push of a BigInt autoincrement id column produces no further steps after the first apply [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::typescript_starter_schema_with_different_native_types_is_idempotent` — schema_push of a Post/User schema then its native-typed equivalent is idempotent across repeated pushes [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::typescript_starter_schema_with_native_types_is_idempotent` — schema_push of a BigInt-keyed Post/User schema then its native-typed equivalent stays idempotent [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::connecting_to_a_cockroachdb_database_with_the_postgresql_connector_fails` — ensure_connection_validity against a cockroachdb database using provider "postgresql" fails with a provider-mismatch error [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::decimal_to_boolean_migrations_work` — create_migration generates expected CREATE TABLE SQL for a Decimal column, then migrating it to Boolean generates the expected drop/recreate SQL [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::int_to_string_conversions_work` — schema_push converts an Int column to String with data present and asserts the stored value round-trips as text [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::adding_an_unsupported_type_must_work` — schema_push creates models with Unsupported("interval") columns and asserts their type family is Unsupported [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::switching_an_unsupported_type_to_supported_must_work` — schema_push converts Unsupported("interval") columns to String and asserts the resulting column type families [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::column_defaults_can_safely_be_changed` — for combinations of optional column defaults, schema_push then insert data then change the default, asserting existing row values and the new default are preserved [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::removing_autoincrement_from_an_existing_field_works` — schema_push removes @default(autoincrement()) from an existing BigInt id, asserting the pk keeps its data and idempotent reapply [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::on_delete_referential_actions_should_work` — for SetNull/Cascade/NoAction, schema_push creates a foreign key with that onDelete action and asserts assert_referential_action_on_delete [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::changing_all_referenced_columns_of_foreign_key_works` — schema_push changes the referenced column of a foreign key from id to a renamed unique column and applies cleanly [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::unique_constraint_errors_in_migrations_must_return_a_known_error` — adding a unique constraint over a column with duplicate values returns a P2002 user-facing unique-constraint error [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::created_at_does_not_get_arbitrarily_migrated` — schema_push of a DateTime @default(now()) column then reapply after inserting data produces no steps [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::sequences_without_options_can_be_created` — schema_push of an Int id with @default(sequence()) generates the expected IDENTITY column SQL and is idempotent [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::sequences_with_options_can_be_created` — schema_push of a sequence() default with min/max/cache/increment/start options generates the expected IDENTITY SQL and is idempotent [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::sequences_without_options_can_be_created_on_non_id_fields` — schema_push creates a sequence()-defaulted column that is not the primary key and generates the expected SQL [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::autoincrement_is_idempotent` — schema_push of a BigInt @default(autoincrement()) id is a no-op on reapply [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::alter_sequence_to_default` — schema_push migrates a sequence with explicit options to a default sequence(), asserting executed steps then no-op on reapply [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::alter_sequence` — schema_push migrates a sequence's min/max/cache/increment/start options to new values, asserting executed steps then no-op on reapply [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::mapped_enum_defaults_must_work` — schema_push of enum values with @map and an array default generates the expected CreateEnum/CreateTable SQL with mapped values [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::json_defaults_with_escaped_quotes_work` — schema_push of a Json column default containing escaped quotes generates the expected CREATE TABLE SQL and is idempotent [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::sequence_with_multiple_models_works` — schema_push of a schema mixing autoincrement and sequence() defaults across two models generates the expected SQL for both tables [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::bigint_defaults_work` — schema_push of a BigInt column with a numeric default generates the expected CREATE TABLE SQL and is idempotent [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::alter_type_works` — connector_diff between BigInt and Int column types is generated and applied via raw_cmd without error [connectors: tags:cockroachdb; exclude:cockroachdb231] - [ ] `migrations::cockroachdb::schema_from_introspection_docs_works` — connector_diff between a raw-created database and its introspected-schema equivalent yields an empty migration [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::cockroach_introspection_with_postgres_provider_fails` — introspect against a cockroachdb database using provider "postgres" fails with a provider-mismatch error [connectors: n/a (plain #[test])] ### schema-engine/sql-migration-tests/tests/migrations/cockroachdb/failure_modes.rs - [ ] `migrations::cockroachdb::failure_modes::failing_migration_after_migration_dropping_data` — apply_migrations across three migrations, the last referencing a dropped column, fails with a precise column-does-not-exist database error [connectors: tags:cockroachdb; exclude:cockroachdb231] - [ ] `migrations::cockroachdb::failure_modes::failing_step_in_migration_dropping_data` — apply_migrations where a single migration drops then re-types a column fails with a column-does-not-exist error on the failing step [connectors: tags:cockroachdb; exclude:cockroachdb231] - [ ] `migrations::cockroachdb::failure_modes::multiple_alter_tables_in_one_migration_works` — apply_migrations with repeated drop/add ALTER TABLE statements for the same column within one migration applies successfully [connectors: tags:cockroachdb; exclude:cockroachdb231] - [ ] `migrations::cockroachdb::failure_modes::multiple_alter_tables_in_multiple_migration_works` — apply_migrations across several migrations each dropping and re-adding the same column applies successfully [connectors: tags:cockroachdb] - [ ] `migrations::cockroachdb::failure_modes::syntax_errors_return_error_position` — apply_migrations on a migration with a SQL syntax error fails with an error message pointing at the exact source position [connectors: tags:cockroachdb; exclude:cockroachdb231] ### schema-engine/sql-migration-tests/tests/migrations/db_execute.rs - [ ] `migrations::db_execute::db_execute_input_source_takes_expected_json_shape` — dbExecute: asserts DbExecuteParams(Url variant) serializes to the expected JSON shape [connectors: n/a (plain #[test])] - [ ] `migrations::db_execute::db_execute_happy_path_with_literal_url` — dbExecute: runs a CREATE TABLE + INSERT script against a literal sqlite url and asserts rows were inserted [connectors: n/a (plain #[test])] - [ ] `migrations::db_execute::db_execute_happy_path_with_prisma_schema` — dbExecute: runs a script against a datasource resolved from a prisma schema file and asserts rows were inserted [connectors: n/a (plain #[test])] - [ ] `migrations::db_execute::mysql_incomplete_script_works` — dbExecute: runs a MySQL script missing a trailing semicolon and asserts it still executes successfully [connectors: tags:mysql] - [ ] `migrations::db_execute::db_execute_error_path` — dbExecute: runs a script with mismatched quoting on MySQL and asserts the command errors [connectors: tags:mysql] - [ ] `migrations::db_execute::db_execute_drop_database_that_doesnt_exist_error` — dbExecute: DROP DATABASE on a nonexistent Postgres database and asserts the "does not exist" error message [connectors: tags:postgres12] - [ ] `migrations::db_execute::sqlite_db_execute_with_schema_datasource_resolves_relative_paths_correctly` — dbExecute: with a schema-based sqlite datasource asserts the relative db file path is resolved relative to the schema dir and created [connectors: n/a (plain #[test])] - [ ] `migrations::db_execute::db_execute_multi_file` — dbExecute: runs a script using a multi-file prisma schema datasource and asserts rows were inserted [connectors: n/a (plain #[test])] ### schema-engine/sql-migration-tests/tests/migrations/defaults.rs - [ ] `migrations::defaults::datetime_defaults_work` — schema_push a DateTime default("2018-01-27T08:00:00Z"), asserts rendered db-generated default value per connector [connectors: exclude:mysql57,mariadb] - [ ] `migrations::defaults::binary_dbgenerated_defaults_should_work` — schema_push a Bytes id with dbgenerated uuid_to_bin(uuid()) default, asserts db-generated default is preserved [connectors: tags:mysql8; exclude:vitess] - [ ] `migrations::defaults::datetime_dbgenerated_defaults` — schema_push Date/DateTime/Time columns with dbgenerated string literal defaults, asserts each default value [connectors: tags:mysql; exclude:mariadb] - [ ] `migrations::defaults::datetime_dbgenerated_defaults_mariadb` — same as datetime_dbgenerated_defaults but with MariaDB-parenthesized dbgenerated literals, asserts default values [connectors: tags:mariadb] - [ ] `migrations::defaults::function_expressions_as_dbgenerated_work` — schema_push a String id with dbgenerated LEFT(UUID(),8) default, asserts normalized db-generated default [connectors: tags:mariadb,mysql8; exclude:vitess] - [ ] `migrations::defaults::default_dbgenerated_with_type_definitions_should_work` — schema_push a String id with dbgenerated (now())::TEXT default, asserts lowercased cast default [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::defaults::default_dbgenerated_with_type_definitions_should_work_cockroach` — schema_push a String id with dbgenerated (now()::text) default, asserts CockroachDB STRING-cast default [connectors: tags:cockroachdb] - [ ] `migrations::defaults::default_dbgenerated_should_work` — schema_push a String id with dbgenerated (now()) default, asserts default rendered as now() [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::defaults::default_dbgenerated_should_work_cockroach` — schema_push a DateTime id with dbgenerated (now()) default, asserts it maps to DefaultValue::now() [connectors: tags:cockroachdb] - [ ] `migrations::defaults::uuid_default` — schema_push a db.Uuid column with a literal uuid string default, asserts default cast to ::uuid [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::defaults::uuid_default_cockroach` — schema_push a db.Uuid column with a literal uuid string default, asserts default cast to ::UUID on Cockroach [connectors: tags:cockroachdb] - [ ] `migrations::defaults::a_default_can_be_dropped` — create_migration/apply_migrations dropping a String default, asserts applied migrations and empty diagnose_migration_history output [connectors: all] - [ ] `migrations::defaults::schemas_with_dbgenerated_work` — schema_push a model with empty dbgenerated() DateTime defaults, asserts green and idempotent (no steps) [connectors: all] - [ ] `migrations::defaults::schemas_with_empty_dbgenerated_work_together_with_time_native_type` — schema_push empty dbgenerated() DateTime @db.Time column, asserts green and idempotent [connectors: tags:mysql] - [ ] `migrations::defaults::schemas_with_dbgenerated_expressions_work` — schema_push many columns with dbgenerated expression defaults across types, asserts green push [connectors: tags:mysql8,mariadb; exclude:vitess] - [ ] `migrations::defaults::column_defaults_must_be_migrated` — schema_push changing a String default value, asserts default_kind updates from "banana" to "mango" [connectors: all] - [ ] `migrations::defaults::default_constraint_names_should_work` — schema_push a String default with explicit map name, asserts MSSQL default constraint name is honored [connectors: tags:mssql] - [ ] `migrations::defaults::default_constraint_name_default_values_should_work` — schema_push a String default without explicit map name, asserts MSSQL auto-generated constraint name [connectors: tags:mssql] - [ ] `migrations::defaults::default_constraint_name_default_values_with_mapping_should_work` — schema_push a mapped column/table with a default, asserts MSSQL constraint name uses mapped names [connectors: tags:mssql] - [ ] `migrations::defaults::escaped_string_defaults_are_not_arbitrarily_migrated` — schema_push escaped/quoted string defaults, inserts data, re-pushes and asserts no steps and default values/constraint names preserved [connectors: all] ### schema-engine/sql-migration-tests/tests/migrations/dev_diagnostic_tests.rs - [ ] `migrations::dev_diagnostic_tests::dev_diagnostic_on_an_empty_database_without_migration_returns_create_migration` — devDiagnostic on empty db/no migrations asserts action is CreateMigration [connectors: all] - [ ] `migrations::dev_diagnostic_tests::dev_diagnostic_after_two_migrations_happy_path` — devDiagnostic after applying two migrations in sync asserts action is CreateMigration [connectors: all] - [ ] `migrations::dev_diagnostic_tests::dev_diagnostic_detects_drift` — devDiagnostic after an out-of-band schema push asserts action is Reset with a drift-detected message [connectors: all] - [ ] `migrations::dev_diagnostic_tests::dev_diagnostic_calculates_drift_in_presence_of_failed_migrations` — devDiagnostic after a failed+edited migration asserts Reset message listing failed, modified, and drift-detected reasons [connectors: exclude:postgres,mssql] - [ ] `migrations::dev_diagnostic_tests::dev_diagnostic_returns_create_migration_when_the_database_is_behind` — devDiagnostic when a migration exists locally but is unapplied asserts action is CreateMigration [connectors: all] - [ ] `migrations::dev_diagnostic_tests::dev_diagnostic_can_detect_when_the_migrations_directory_is_behind` — devDiagnostic detects a deleted local migration folder and asserts Reset message about migrations applied but missing locally [connectors: all] - [ ] `migrations::dev_diagnostic_tests::dev_diagnostic_can_detect_when_history_diverges` — devDiagnostic detects diverging history and asserts Reset message naming last common migration and diverged migrations [connectors: all] - [ ] `migrations::dev_diagnostic_tests::dev_diagnostic_can_detect_edited_migrations` — devDiagnostic detects an edited applied migration and asserts Reset message stating it was modified after being applied [connectors: all] - [ ] `migrations::dev_diagnostic_tests::dev_diagnostic_reports_migrations_failing_to_apply_cleanly` — devDiagnostic errors with MigrationDoesNotApplyCleanly when an applied migration is edited to fail [connectors: all] - [ ] `migrations::dev_diagnostic_tests::dev_diagnostic_with_a_nonexistent_migrations_directory_works` — devDiagnostic on a removed migrations directory asserts action is CreateMigration [connectors: all] - [ ] `migrations::dev_diagnostic_tests::with_a_failed_migration` — devDiagnostic after a failed migration whose folder was deleted asserts Reset message states the migration failed [connectors: all] - [ ] `migrations::dev_diagnostic_tests::with_an_invalid_unapplied_migration_should_report_it` — devDiagnostic errors with MigrationDoesNotApplyCleanly when an unapplied migration is broken [connectors: all] - [ ] `migrations::dev_diagnostic_tests::drift_can_be_detected_without_migrations_table_dev` — devDiagnostic detects drift (added table) via Reset message when no migrations table exists yet, including first-time documentation link [connectors: tags:postgres] - [ ] `migrations::dev_diagnostic_tests::drift_detect_first_time_message_should_not_be_dispyed_if_migration_table_exists` — devDiagnostic detects drift via Reset message without the first-time doc link when a migrations table already exists [connectors: tags:postgres] - [ ] `migrations::dev_diagnostic_tests::dev_diagnostic_shadow_database_creation_error_is_special_cased_mysql` — devDiagnostic errors with a shadow-db-creation permission message when the mysql user lacks db-creation permission [connectors: tags:mysql8; exclude:vitess] - [ ] `migrations::dev_diagnostic_tests::dev_diagnostic_shadow_database_creation_error_is_special_cased_postgres` — devDiagnostic errors with a shadow-db-creation permission message when the postgres user lacks db-creation permission [connectors: tags:postgres12] - [ ] `migrations::dev_diagnostic_tests::dev_diagnostic_multi_schema_does_not_panic` — devDiagnostic with a multi-schema (public/auth) datamodel and out-of-band DDL asserts it runs without panicking [connectors: n/a (plain #[test])] ### schema-engine/sql-migration-tests/tests/migrations/diagnose_migration_history_tests.rs - [ ] `migrations::diagnose_migration_history_tests::diagnose_migrations_history_on_an_empty_database_without_migration_returns_nothing` — diagnoseMigrationHistory on empty db/no migrations asserts empty output [connectors: all] - [ ] `migrations::diagnose_migration_history_tests::diagnose_migrations_history_after_two_migrations_happy_path` — diagnoseMigrationHistory after applying two migrations asserts empty output (no drift/history issues) [connectors: all] - [ ] `migrations::diagnose_migration_history_tests::diagnose_migration_history_with_opt_in_to_shadow_database_calculates_drift` — diagnoseMigrationHistory with shadow-db opt-in detects drift and asserts rollback summary shows added column [connectors: tags:postgres] - [ ] `migrations::diagnose_migration_history_tests::diagnose_migration_history_without_opt_in_to_shadow_database_does_not_calculate_drift` — diagnoseMigrationHistory without shadow-db opt-in asserts drift is not calculated despite schema push [connectors: all] - [ ] `migrations::diagnose_migration_history_tests::diagnose_migration_history_calculates_drift_in_presence_of_failed_migrations` — diagnoseMigrationHistory with shadow-db opt-in after a failed migration asserts drift summary plus failed/edited migration counts [connectors: exclude:postgres,mssql] - [ ] `migrations::diagnose_migration_history_tests::diagnose_migrations_history_can_detect_when_the_database_is_behind` — diagnoseMigrationHistory detects unapplied migration and reports history as DatabaseIsBehind [connectors: all] - [ ] `migrations::diagnose_migration_history_tests::diagnose_migrations_history_reports_rolled_back_migration_as_unapplied` — diagnoseMigrationHistory after marking a failed migration rolled back reports it as unapplied via DatabaseIsBehind [connectors: all] - [ ] `migrations::diagnose_migration_history_tests::diagnose_migrations_history_can_detect_when_the_folder_is_behind` — diagnoseMigrationHistory with shadow-db opt-in detects drift and reports MigrationsDirectoryIsBehind when a migration folder is deleted [connectors: all] - [ ] `migrations::diagnose_migration_history_tests::diagnose_migrations_history_can_detect_when_history_diverges` — diagnoseMigrationHistory with shadow-db opt-in detects drift and reports HistoriesDiverge with unapplied/unpersisted names and last common migration [connectors: all] - [ ] `migrations::diagnose_migration_history_tests::diagnose_migrations_history_can_detect_edited_migrations` — diagnoseMigrationHistory detects an edited applied migration and reports its name in edited_migration_names [connectors: all] - [ ] `migrations::diagnose_migration_history_tests::diagnose_migrations_history_reports_migrations_failing_to_apply_cleanly` — diagnoseMigrationHistory with shadow-db opt-in reports MigrationFailedToApply drift for an edited migration that no longer applies cleanly [connectors: all] - [ ] `migrations::diagnose_migration_history_tests::diagnose_migrations_history_with_a_nonexistent_migrations_directory_works` — diagnoseMigrationHistory on a removed migrations directory asserts no drift/history and has_migrations_table false [connectors: all] - [ ] `migrations::diagnose_migration_history_tests::dmh_with_a_failed_migration` — diagnoseMigrationHistory with shadow-db opt-in reports a failed migration name and an error_in_unapplied_migration with MigrationDoesNotApplyCleanly [connectors: all] - [ ] `migrations::diagnose_migration_history_tests::dmh_with_an_invalid_unapplied_migration_should_report_it` — diagnoseMigrationHistory with shadow-db opt-in reports DatabaseIsBehind plus error_in_unapplied_migration for an unapplied broken migration [connectors: all] - [ ] `migrations::diagnose_migration_history_tests::diagnose_migration_history_ignores_manual_partial_indexes_without_preview_feature` — diagnoseMigrationHistory with shadow-db opt-in ignores a manually created partial index, asserting no drift [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::diagnose_migration_history_tests::drift_can_be_detected_without_migrations_table` — diagnoseMigrationHistory with shadow-db opt-in detects drift and DatabaseIsBehind history when no migrations table exists yet [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::diagnose_migration_history_tests::shadow_database_creation_error_is_special_cased_mysql` — diagnoseMigrationHistory with shadow-db opt-in surfaces a special-cased ShadowDbCreationError when the mysql user lacks db-creation permission [connectors: tags:mysql8; exclude:vitess] - [ ] `migrations::diagnose_migration_history_tests::shadow_database_creation_error_is_special_cased_postgres` — diagnoseMigrationHistory with shadow-db opt-in surfaces a special-cased ShadowDbCreationError when the postgres user lacks db-creation permission [connectors: tags:postgres12] - [ ] `migrations::diagnose_migration_history_tests::shadow_database_creation_error_is_special_cased_mssql` — diagnoseMigrationHistory with shadow-db opt-in surfaces a special-cased ShadowDbCreationError when the mssql user lacks db-creation permission [connectors: tags:mssql2019] - [ ] `migrations::diagnose_migration_history_tests::empty_migration_directories_should_cause_known_errors` — diagnoseMigrationHistory on a migration directory missing its migration.sql file asserts MigrationFileNotFound error with the expected file path meta [connectors: tags:sqlite] - [ ] `migrations::diagnose_migration_history_tests::indexes_on_same_columns_with_different_names_should_work` — diagnoseMigrationHistory with shadow-db opt-in asserts no drift for duplicate indexes on the same columns under different names [connectors: all] - [ ] `migrations::diagnose_migration_history_tests::foreign_keys_on_same_columns_should_work` — diagnoseMigrationHistory with shadow-db opt-in asserts no drift/empty output for two foreign keys sharing the same columns [connectors: exclude:sqlite,mssql] - [ ] `migrations::diagnose_migration_history_tests::default_dbgenerated_should_not_cause_drift` — diagnoseMigrationHistory with shadow-db opt-in asserts a dbgenerated default does not cause drift [connectors: tags:postgres] - [ ] `migrations::diagnose_migration_history_tests::default_uuid_should_not_cause_drift` — diagnoseMigrationHistory with shadow-db opt-in asserts a uuid column default does not cause drift [connectors: tags:postgres] ### schema-engine/sql-migration-tests/tests/migrations/diff.rs - [ ] `migrations::diff::from_unique_index_to_without` — diff renders per-connector script dropping the unique index (and fk on mysql) when a unique relation field loses `@unique` [connectors: tags:sqlite,mysql,postgres,cockroachdb,mssql] - [ ] `migrations::diff::from_unique_index_to_pk` — diff renders per-connector script converting unique indexes to primary keys across three models [connectors: all] - [ ] `migrations::diff::from_empty_to_migrations_directory` — diff from Empty to a migrations directory renders the CreateSchema/CreateTable script via diff_cli [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::diff::from_empty_to_migrations_folder_without_shadow_db_url_must_error` — diff from Empty to a migrations directory without shadowDatabaseUrl set asserts a config error [connectors: exclude:sqlite] - [ ] `migrations::diff::from_schema_datamodel_to_url` — diff from a schema datamodel to a db url renders drop-table/create-table script [connectors: tags:sqlite] - [ ] `migrations::diff::from_schema_datasource_relative` — diff from a datasource with relative sqlite path to Empty renders a drop-table script [connectors: tags:sqlite] - [ ] `migrations::diff::from_schema_datasource_to_url` — diff from a schema datasource to a second db url renders drop-table/create-table script [connectors: tags:sqlite] - [ ] `migrations::diff::with_schema_filters` — diff with external_tables filter excludes the filtered table, asserting an empty migration message [connectors: tags:sqlite] - [ ] `migrations::diff::with_invalid_schema_filter_sqlite` — diff with a schema-qualified filter on sqlite errors with code P3024 [connectors: tags:sqlite] - [ ] `migrations::diff::with_invalid_schema_filter_postgres` — diff with an external_tables filter on a nonexistent postgres table errors with code P3023 [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::diff::from_url_to_url` — diff between two db urls renders drop-table/create-table script [connectors: tags:sqlite] - [ ] `migrations::diff::diffing_mongo_schemas_to_script_returns_a_nice_error` — diff of two mongo schemas with script=true asserts a "not supported on MongoDB" error [connectors: n/a (plain #[test])] - [ ] `migrations::diff::diff_sqlite_migration_directories` — diff between two empty sqlite migrations directories completes without error [connectors: n/a (plain #[test])] - [ ] `migrations::diff::from_migrations_to_schema_datamodel_ignores_manual_partial_indexes_without_preview_feature` — diff from migrations dir to schema datamodel ignores a manually created partial index, asserting no difference and exit code 0 [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::diff::from_schema_datamodel_to_migrations_ignores_manual_partial_indexes_without_preview_feature` — diff from schema datamodel to migrations dir ignores a manually created partial index, asserting no difference and exit code 0 [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::diff::from_migrations_to_url_ignores_manual_partial_indexes_with_engine_seeded_schema` — diff from migrations dir to db url with engine-seeded initial datamodel ignores a manual partial index, asserting no difference [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::diff::diffing_mongo_schemas_works` — diff of two mongo schemas without script prints added collection and index changes [connectors: n/a (plain #[test])] - [ ] `migrations::diff::diff_with_exit_code_and_empty_diff_returns_zero` — diff with exit_code between identical schemas returns exit code 0 and "No difference detected" [connectors: n/a (plain #[test])] - [ ] `migrations::diff::diff_with_exit_code_and_non_empty_diff_returns_two` — diff with exit_code from Empty to a schema with a new table returns exit code 2 and an added-table summary [connectors: n/a (plain #[test])] - [ ] `migrations::diff::diff_with_non_existing_sqlite_database_from_url` — diff to a nonexistent sqlite db url errors with "Database does not exist" [connectors: n/a (plain #[test])] - [ ] `migrations::diff::diff_with_non_existing_sqlite_database_from_datasource` — diff from a datasource pointing at a nonexistent sqlite db errors with "Database does not exist" [connectors: n/a (plain #[test])] - [ ] `migrations::diff::from_multi_file_schema_datasource_to_url` — diff from a multi-file schema datasource to a db url renders drop-table/create-table script [connectors: all] - [ ] `migrations::diff::from_multi_file_schema_datamodel_to_url` — diff from a multi-file schema datamodel to a db url renders drop-tables/create-table script for two dropped models [connectors: all] ### schema-engine/sql-migration-tests/tests/migrations/drift_summary.rs - [ ] `migrations::drift_summary::empty_schemas` — diff between two identical empty sqlite schemas asserts "No difference detected" [connectors: n/a (plain #[test])] - [ ] `migrations::drift_summary::additions_schemas` — diff adding two postgres multi-schemas and their tables asserts Added Schemas and Added tables summary [connectors: n/a (plain #[test])] - [ ] `migrations::drift_summary::additions_table` — diff adding a new sqlite table asserts Added tables summary [connectors: n/a (plain #[test])] - [ ] `migrations::drift_summary::additions_column` — diff adding a nullable column to a sqlite table asserts Changed table / Added column summary [connectors: n/a (plain #[test])] - [ ] `migrations::drift_summary::additions_enum` — diff adding a postgres enum asserts Added enums summary [connectors: n/a (plain #[test])] - [ ] `migrations::drift_summary::additions_mixed` — diff adding a postgres table and enum together asserts combined Added enums/tables summary [connectors: n/a (plain #[test])] - [ ] `migrations::drift_summary::deletions_table` — diff removing a sqlite table asserts Removed tables summary [connectors: n/a (plain #[test])] - [ ] `migrations::drift_summary::deletions_enum` — diff removing a postgres enum asserts Removed enums summary [connectors: n/a (plain #[test])] - [ ] `migrations::drift_summary::deletions_mixed` — diff removing a postgres table and enum together asserts combined Removed enums/tables summary [connectors: n/a (plain #[test])] - [ ] `migrations::drift_summary::deletions_column` — diff removing a mysql column asserts Changed table / Removed column summary [connectors: n/a (plain #[test])] - [ ] `migrations::drift_summary::additions_and_deletions_mixed` — diff swapping a postgres table+enum for a different table asserts combined Added tables / Removed enums / Removed tables summary [connectors: n/a (plain #[test])] - [ ] `migrations::drift_summary::multiple_changed_tables_and_enums` — diff with multiple postgres table/enum changes asserts full drift summary covering added enums, changed enum variants, and changed table columns/keys/indexes [connectors: n/a (plain #[test])] ### schema-engine/sql-migration-tests/tests/migrations/enums.rs - [ ] `migrations::enums::an_enum_can_be_turned_into_a_model` — schema_push replacing an enum field with a related model, asserts enum dropped and new table/columns present [connectors: caps:enums] - [ ] `migrations::enums::variants_can_be_added_to_an_existing_enum` — schema_push adding enum variants HAPPY/JOYJOY, asserts enum values updated [connectors: caps:enums] - [ ] `migrations::enums::variants_can_be_removed_from_an_existing_enum` — schema_push removing an enum variant with force, asserts warning and reduced enum values [connectors: caps:enums] - [ ] `migrations::enums::models_with_enum_values_can_be_dropped` — inserts a row then schema_push("") with force to drop the table, asserts non-empty-table warning and table count 0 [connectors: caps:enums] - [ ] `migrations::enums::enum_field_to_string_field_works` — schema_push converting an enum column to String with force, asserts column becomes string type [connectors: caps:enums] - [ ] `migrations::enums::string_field_to_enum_field_works` — schema_push converting a String column to enum with force, asserts cast warning and enum type result [connectors: caps:enums] - [ ] `migrations::enums::enums_used_in_default_can_be_changed` — schema_push altering enum values used as column defaults across five models with force, asserts warnings and table count preserved [connectors: caps:enums] - [ ] `migrations::enums::changing_all_values_of_enums_used_in_defaults_works` — schema_push renaming every enum value used in defaults with force, asserts new default value and idempotent re-push [connectors: caps:enums] - [ ] `migrations::enums::sqlite_text_is_picked_up_as_enum` — raw_cmd creates a TEXT column then schema_push an equivalent enum schema, asserts green no-steps introspection match [connectors: tags:sqlite] - [ ] `migrations::enums::existing_enums_are_picked_up` — raw_cmd creates a Postgres ENUM type/table then schema_push equivalent schema, asserts green no-steps match [connectors: tags:postgres] - [ ] `migrations::enums::enum_array_modification_should_work` — create_migration/apply_migrations sequence adding then shrinking a Position[] enum array, asserts applied migrations at each step [connectors: tags:postgres] - [ ] `migrations::enums::mapped_enum_defaults_must_work` — expect_sql_for_schema and schema_push a mapped enum with array/default values, asserts exact CREATE TYPE/TABLE SQL and idempotent push [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::enums::alter_enum_and_change_default_must_work` — schema_push and create_migration altering enum values and array default with force, asserts warnings, resulting default value, and exact AlterEnum/AlterTable SQL [connectors: tags:postgres; exclude:cockroachdb] ### schema-engine/sql-migration-tests/tests/migrations/foreign_keys.rs - [ ] `migrations::foreign_keys::foreign_keys_of_inline_one_to_one_relations_have_a_unique_constraint` — schema_push on 1:1 inline relation asserts unique index created on FK column [connectors: all] - [ ] `migrations::foreign_keys::foreign_keys_are_added_on_existing_tables` — schema_push adds new FK column+constraint to pre-existing tables [connectors: exclude:vitess] - [ ] `migrations::foreign_keys::foreign_keys_can_be_added_on_existing_columns` — schema_push adds FK constraint on a column that already exists without one [connectors: exclude:vitess] - [ ] `migrations::foreign_keys::foreign_keys_can_be_dropped_on_existing_columns` — schema_push removes relation, asserts FK constraint dropped while column remains [connectors: exclude:vitess] - [ ] `migrations::foreign_keys::changing_a_scalar_field_to_a_relation_field_must_work` — forced schema_push converts scalar column into relation FK column, asserts type/reference change [connectors: exclude:vitess] - [ ] `migrations::foreign_keys::changing_a_relation_field_to_a_scalar_field_must_work` — schema_push converts relation FK column back into plain scalar column, asserts FK dropped [connectors: exclude:vitess] - [ ] `migrations::foreign_keys::changing_a_foreign_key_constrained_column_from_nullable_to_required_and_back_works` — schema_push toggles FK column nullability required→optional→required successfully [connectors: exclude:vitess] - [ ] `migrations::foreign_keys::changing_all_referenced_columns_of_foreign_key_works` — schema_push changes FK's referenced column (id renamed to uid) successfully [connectors: exclude:cockroachdb] ### schema-engine/sql-migration-tests/tests/migrations/id.rs - [ ] `migrations::id::length_prefixed_primary_key` — schema_push on MySQL8 creates length-prefixed pk column, asserts length prefix [connectors: tags:mysql8] - [ ] `migrations::id::changing_of_length_prefix` — schema_push changes id length-prefix 30→20, asserts updated prefix [connectors: tags:mysql8] - [ ] `migrations::id::removing_length_prefix` — schema_push removes id length-prefix, asserts no prefix remains [connectors: tags:mysql8] - [ ] `migrations::id::length_prefixed_compound_primary_key` — schema_push creates compound pk with per-column length prefixes, asserts both prefixes [connectors: tags:mysql8] - [ ] `migrations::id::changing_the_type_of_an_id_field_must_work` — schema_push changes referenced id field type Int→String across relation, asserts FK column/type updated [connectors: exclude:vitess,cockroachdb] - [ ] `migrations::id::models_with_an_autoincrement_field_as_part_of_a_multi_field_id_can_be_created` — schema_push creates compound id including autoincrement field, asserts pk columns and autoincrement [connectors: exclude:sqlite,cockroachdb] - [ ] `migrations::id::making_an_existing_id_field_autoincrement_works` — schema_push adds autoincrement to existing id with data, asserts pk autoincrement flag, idempotent, data preserved [connectors: exclude:sqlite,cockroachdb] - [ ] `migrations::id::removing_autoincrement_from_an_existing_field_works` — schema_push removes autoincrement from id with existing data, asserts pk no-autoincrement, idempotent, data preserved [connectors: exclude:sqlite,cockroachdb] - [ ] `migrations::id::flipping_autoincrement_on_and_off_works` — schema_push repeatedly toggles autoincrement on/off on id field, asserts green each time [connectors: exclude:sqlite,cockroachdb] - [ ] `migrations::id::making_an_autoincrement_default_an_expression_then_autoincrement_again_works` — schema_push cycles id default autoincrement→literal(3)→autoincrement, asserts pk/default state each step [connectors: exclude:sqlite,cockroachdb] - [ ] `migrations::id::migrating_a_unique_constraint_to_a_primary_key_works` — forced schema_push replaces cuid id pk with compound unique-fields pk, asserts warnings and new pk columns [connectors: exclude:cockroachdb] ### schema-engine/sql-migration-tests/tests/migrations/id/cockroachdb.rs - [ ] `migrations::id::cockroachdb::flipping_autoincrement_on_and_off_works` — schema_push repeatedly toggles BigInt id autoincrement on/off on CockroachDB, asserts green each time [connectors: tags:cockroachdb] - [ ] `migrations::id::cockroachdb::models_with_an_autoincrement_field_as_part_of_a_multi_field_id_can_be_created` — schema_push creates compound id with autoincrement BigInt field, asserts pk columns and UniqueRowid default kind [connectors: tags:cockroachdb] - [ ] `migrations::id::cockroachdb::making_an_existing_id_field_autoincrement_works` — schema_push adds autoincrement to existing BigInt id with data, asserts pk autoincrement flag, idempotent, data preserved [connectors: tags:cockroachdb] ### schema-engine/sql-migration-tests/tests/migrations/id/mssql.rs - [ ] `migrations::id::mssql::non_clustered_id` — schema_push creates id with `clustered: false`, asserts non-clustered pk, idempotent [connectors: tags:mssql] - [ ] `migrations::id::mssql::non_clustered_to_clustered_change` — raw_cmd creates non-clustered pk then forced schema_push migrates to clustered pk, idempotent [connectors: tags:mssql] - [ ] `migrations::id::mssql::clustered_to_non_clustered_change` — raw_cmd creates clustered pk then forced schema_push migrates to non-clustered pk, idempotent [connectors: tags:mssql] - [ ] `migrations::id::mssql::clustered_id` — schema_push creates id with `clustered: true`, asserts clustered pk, idempotent [connectors: tags:mssql] - [ ] `migrations::id::mssql::default_id_clustering` — schema_push creates plain `@id`, asserts default pk clustering is clustered, idempotent [connectors: tags:mssql] - [ ] `migrations::id::mssql::non_clustered_compound_id` — schema_push creates compound `@@id` with `clustered: false`, asserts non-clustered pk, idempotent [connectors: tags:mssql] - [ ] `migrations::id::mssql::descending_primary_key` — schema_push creates id with `sort: Desc`, asserts descending pk sort order [connectors: tags:mssql] - [ ] `migrations::id::mssql::altering_descending_primary_key` — forced schema_push changes pk sort order Desc→Asc, asserts sort order updated [connectors: tags:mssql] - [ ] `migrations::id::mssql::making_an_existing_id_field_autoincrement_works_with_indices` — schema_push adds autoincrement to id with existing secondary index and data, asserts pk/index preserved, idempotent, data preserved [connectors: tags:mssql] - [ ] `migrations::id::mssql::making_an_existing_id_field_autoincrement_works_with_foreign_keys` — schema_push adds autoincrement to id referenced by FKs with existing data, asserts pk autoincrement flag, data preserved [connectors: tags:mssql] ### schema-engine/sql-migration-tests/tests/migrations/id/vitess.rs - [ ] `migrations::id::vitess::changing_the_type_of_an_id_field_must_work` — schema_push changes referenced id field type Int→String on Vitess, asserts FK column type updated [connectors: tags:vitess] ### schema-engine/sql-migration-tests/tests/migrations/indexes.rs - [ ] `migrations::indexes::index_on_compound_relation_fields_must_work` — schema_push on models with compound FK and index; asserts index on authorEmail/authorName named testIndex [connectors: all] - [ ] `migrations::indexes::index_settings_must_be_migrated` — schema_push non-unique index then switch to unique with same map name; asserts index becomes unique [connectors: all] - [ ] `migrations::indexes::unique_directive_on_required_one_to_one_relation_creates_one_index` — schema_push required 1:1 relation with @unique FK; asserts only one index created [connectors: all] - [ ] `migrations::indexes::one_to_many_self_relations_do_not_create_a_unique_index` — schema_push self-relation; asserts no unique index (MySQL gets non-unique FK index) [connectors: exclude:vitess] - [ ] `migrations::indexes::model_with_multiple_indexes_works` — schema_push model with three FKs each @@index; asserts 3 indexes on Like table [connectors: all] - [ ] `migrations::indexes::removing_multi_field_unique_index_must_work` — schema_push then remove @@unique compound; asserts index dropped [connectors: all] - [ ] `migrations::indexes::index_renaming_must_work` — schema_push then rename unique/index map names; asserts both indexes renamed correctly [connectors: all] - [ ] `migrations::indexes::index_renaming_must_work_when_renaming_to_default` — schema_push custom map name then remove map; asserts index renamed to default generated name [connectors: all] - [ ] `migrations::indexes::index_renaming_must_work_when_renaming_to_custom` — schema_push default unique name then add custom map; asserts index renamed to custom name [connectors: all] - [ ] `migrations::indexes::index_updates_with_rename_must_work` — schema_push change unique columns with rename (forced); asserts new unique index on updated columns, executable [connectors: all] - [ ] `migrations::indexes::dropping_a_model_with_a_multi_field_unique_index_must_work` — schema_push model with unique index then drop model entirely; asserts green [connectors: all] - [ ] `migrations::indexes::indexes_with_an_automatically_truncated_name_are_idempotent` — schema_push long compound index name; asserts truncated name matches DB-specific limit and re-push is idempotent [connectors: tags:postgres,mysql] - [ ] `migrations::indexes::new_index_with_same_name_as_index_from_dropped_table_works` — schema_push swap models reusing same index name "ownerid" across recreated table; asserts green and column required [connectors: all] - [ ] `migrations::indexes::column_type_migrations_should_not_implicitly_drop_indexes` — schema_push column type change (String→Int) on indexed column; asserts index on "name" preserved [connectors: all] - [ ] `migrations::indexes::column_type_migrations_should_not_implicitly_drop_compound_indexes` — schema_push column type change on compound-indexed column; asserts compound index on name/age preserved [connectors: all] - [ ] `migrations::indexes::length_prefixed_index` — schema_push @@index with length-prefixed columns; asserts index columns have length prefixes 30/20 [connectors: tags:mysql8] - [ ] `migrations::indexes::length_prefixed_unique` — schema_push @@unique with length-prefixed columns; asserts unique index columns have length prefixes 30/20 [connectors: tags:mysql8] - [ ] `migrations::indexes::removal_length_prefix_unique` — schema_push unique with length prefixes then remove prefixes (forced); asserts warning and no-length-prefix unique index [connectors: tags:mysql8] - [ ] `migrations::indexes::removal_index_length_prefix` — schema_push index with length prefixes then remove prefixes; asserts index columns lose length prefix [connectors: tags:mysql8] - [ ] `migrations::indexes::descending_compound_index` — schema_push compound index with desc sort on second column; asserts sort orders asc/desc [connectors: exclude:mysql56,mysql57,mariadb] - [ ] `migrations::indexes::descending_compound_unique` — schema_push compound unique with desc sort on second column; asserts sort orders asc/desc [connectors: exclude:mysql56,mysql57,mariadb] - [ ] `migrations::indexes::descending_unique` — schema_push single-column @unique(sort: Desc); asserts unique index sort order desc [connectors: exclude:mysql56,mysql57,mariadb] - [ ] `migrations::indexes::removal_descending_unique` — schema_push desc unique then remove sort (forced); asserts warning and sort order reverts to asc [connectors: exclude:mysql56,mysql57,mariadb] - [ ] `migrations::indexes::removal_descending_unique_should_not_happen_without_preview_feature` — raw_cmd creates DESC unique constraint then schema_push plain @unique; asserts no migration steps without preview feature [connectors: tags:mysql8] - [ ] `migrations::indexes::removal_index_length_prefix_should_not_happen_without_preview_feature` — raw_cmd creates length-prefixed unique constraint then schema_push plain @unique; asserts no migration steps without preview feature [connectors: tags:mysql8] - [ ] `migrations::indexes::fulltext_index` — schema_push @@fulltext index; asserts fulltext index created with default name [connectors: tags:mysql] - [ ] `migrations::indexes::fulltext_index_with_map` — schema_push @@fulltext with custom map name; asserts fulltext index named "with_map" [connectors: tags:mysql] - [ ] `migrations::indexes::adding_fulltext_index_to_an_existing_column` — schema_push table without index then add @@fulltext; asserts fulltext index added [connectors: tags:mysql] - [ ] `migrations::indexes::changing_normal_index_to_a_fulltext_index` — schema_push normal @@index then change to @@fulltext; asserts index type changes from normal to fulltext [connectors: tags:mysql; exclude:mysql56] - [ ] `migrations::indexes::changing_unique_to_pk_works` — schema_push @unique/@@unique fields then change to @id/@@id; asserts unique indexes become primary keys [connectors: all] ### schema-engine/sql-migration-tests/tests/migrations/indexes/cockroachdb/gin.rs - [ ] `migrations::indexes::cockroachdb::gin::gin_preview_disabled` — raw_cmd creates GIN index on int4[] column then schema_push @@index([data]) without preview feature; asserts no migration steps [connectors: tags:cockroachdb] - [ ] `migrations::indexes::cockroachdb::gin::gin_array_ops` — schema_push @@index([data], type: Gin) on Int[] column with cockroachDb preview feature; asserts index algorithm is Gin and idempotent [connectors: tags:cockroachdb; preview:cockroachdb] - [ ] `migrations::indexes::cockroachdb::gin::gin_jsonb_ops` — schema_push @@index([data], type: Gin) on Json column with cockroachDb preview feature; asserts index algorithm is Gin and idempotent [connectors: tags:cockroachdb; preview:cockroachdb] - [ ] `migrations::indexes::cockroachdb::gin::gin_raw_ops` — schema_push @@index([data], type: Gin) on Unsupported("geometry") column with cockroachDb preview feature; asserts index algorithm is Gin and idempotent [connectors: tags:cockroachdb; preview:cockroachdb] ### schema-engine/sql-migration-tests/tests/migrations/indexes/mssql.rs - [ ] `migrations::indexes::mssql::clustered_index` — schema_push @@index(clustered: true) with non-clustered PK; asserts index is clustered and idempotent re-push has no steps [connectors: tags:mssql] - [ ] `migrations::indexes::mssql::non_clustered_index` — schema_push @@index(clustered: false); asserts index is non-clustered and idempotent re-push has no steps [connectors: tags:mssql] - [ ] `migrations::indexes::mssql::default_clustered_index` — schema_push @@index with no clustered option; asserts default index is non-clustered and idempotent re-push has no steps [connectors: tags:mssql] - [ ] `migrations::indexes::mssql::clustered_index_no_preview` — raw_cmd creates clustered index on brownfield table then schema_push matching @@index; asserts non-clustered describe (clustered not represented) and idempotent [connectors: tags:mssql] - [ ] `migrations::indexes::mssql::non_clustered_to_clustered_index` — raw_cmd creates nonclustered index then schema_push @@index(clustered: true); asserts index becomes clustered [connectors: tags:mssql] - [ ] `migrations::indexes::mssql::clustered_to_non_clustered_index` — raw_cmd creates clustered index then schema_push @@index(clustered: false); asserts index becomes non-clustered [connectors: tags:mssql] ### schema-engine/sql-migration-tests/tests/migrations/indexes/partial.rs - [ ] `migrations::indexes::partial::partial_unique_index_on_postgres` — schema_push creates a partial unique index on User.email with predicate status='active'; asserts unique + predicate; re-push no-op [connectors: tags:postgres; exclude:cockroachdb; preview:partialindexes] - [ ] `migrations::indexes::partial::partial_normal_index_on_postgres` — schema_push creates a partial non-unique index on email with predicate status IS NOT NULL; asserts predicate; re-push no-op [connectors: tags:postgres; exclude:cockroachdb; preview:partialindexes] - [ ] `migrations::indexes::partial::compound_partial_unique_index_on_postgres` — schema_push creates a compound partial unique index on firstName+lastName with predicate status='active'; asserts predicate; re-push no-op [connectors: tags:postgres; exclude:cockroachdb; preview:partialindexes] - [ ] `migrations::indexes::partial::modify_partial_index_predicate_postgres` — forced schema_push modifies partial unique index predicate from active to verified; asserts updated predicate [connectors: tags:postgres; exclude:cockroachdb; preview:partialindexes] - [ ] `migrations::indexes::partial::remove_partial_index_predicate_postgres` — forced schema_push removes partial index predicate from a unique index; asserts unique index with no predicate [connectors: tags:postgres; exclude:cockroachdb; preview:partialindexes] - [ ] `migrations::indexes::partial::add_partial_index_predicate_postgres` — forced schema_push adds a predicate to a previously non-partial unique index; asserts predicate present [connectors: tags:postgres; exclude:cockroachdb; preview:partialindexes] - [ ] `migrations::indexes::partial::partial_unique_index_on_sqlite` — schema_push creates a partial unique index predicate on sqlite; asserts predicate; re-push no-op [connectors: tags:sqlite; preview:partialindexes] - [ ] `migrations::indexes::partial::partial_normal_index_on_sqlite` — schema_push creates a partial non-unique index predicate on sqlite; asserts predicate; re-push no-op [connectors: tags:sqlite; preview:partialindexes] - [ ] `migrations::indexes::partial::compound_partial_unique_index_on_sqlite` — schema_push creates a compound partial unique index predicate on sqlite; asserts predicate; re-push no-op [connectors: tags:sqlite; preview:partialindexes] - [ ] `migrations::indexes::partial::modify_partial_index_predicate_sqlite` — forced schema_push modifies partial index predicate from active to verified on sqlite [connectors: tags:sqlite; preview:partialindexes] - [ ] `migrations::indexes::partial::remove_partial_index_predicate_sqlite` — forced schema_push removes partial index predicate on sqlite; asserts no predicate remains [connectors: tags:sqlite; preview:partialindexes] - [ ] `migrations::indexes::partial::add_partial_index_predicate_sqlite` — forced schema_push adds a partial index predicate on sqlite; asserts predicate present [connectors: tags:sqlite; preview:partialindexes] - [ ] `migrations::indexes::partial::partial_unique_index_on_mssql` — schema_push creates a partial unique index predicate on mssql; asserts predicate; re-push no-op [connectors: tags:mssql; preview:partialindexes] - [ ] `migrations::indexes::partial::partial_normal_index_on_mssql` — schema_push creates a partial non-unique index predicate on mssql; asserts predicate; re-push no-op [connectors: tags:mssql; preview:partialindexes] - [ ] `migrations::indexes::partial::compound_partial_unique_index_on_mssql` — schema_push creates a compound partial unique index predicate on mssql; asserts predicate; re-push no-op [connectors: tags:mssql; preview:partialindexes] - [ ] `migrations::indexes::partial::modify_partial_index_predicate_mssql` — forced schema_push modifies partial index predicate from active to verified on mssql [connectors: tags:mssql; preview:partialindexes] - [ ] `migrations::indexes::partial::remove_partial_index_predicate_mssql` — forced schema_push removes partial index predicate on mssql; asserts no predicate remains [connectors: tags:mssql; preview:partialindexes] - [ ] `migrations::indexes::partial::add_partial_index_predicate_mssql` — forced schema_push adds a partial index predicate on mssql; asserts predicate present [connectors: tags:mssql; preview:partialindexes] - [ ] `migrations::indexes::partial::partial_unique_index_on_cockroachdb` — schema_push creates a partial unique index on cockroachdb; asserts is_partial; re-push no-op [connectors: tags:cockroachdb; preview:partialindexes] - [ ] `migrations::indexes::partial::partial_normal_index_on_cockroachdb` — schema_push creates a partial non-unique index on cockroachdb; asserts is_partial; re-push no-op [connectors: tags:cockroachdb; preview:partialindexes] - [ ] `migrations::indexes::partial::compound_partial_unique_index_on_cockroachdb` — schema_push creates a compound partial unique index on cockroachdb; asserts is_partial; re-push no-op [connectors: tags:cockroachdb; preview:partialindexes] - [ ] `migrations::indexes::partial::partial_index_object_literal_camel_case_postgres` — schema_push with an object-literal where clause on a camelCase boolean field compiles to a quoted predicate on postgres; re-push no-op [connectors: tags:postgres; exclude:cockroachdb; preview:partialindexes] - [ ] `migrations::indexes::partial::partial_index_object_literal_camel_case_sqlite` — schema_push with an object-literal where clause on a camelCase boolean field compiles to a predicate on sqlite; re-push no-op [connectors: tags:sqlite; preview:partialindexes] - [ ] `migrations::indexes::partial::partial_index_object_literal_camel_case_mssql` — schema_push with an object-literal where clause on a camelCase boolean field compiles to a bracketed predicate on mssql; re-push no-op [connectors: tags:mssql; preview:partialindexes] - [ ] `migrations::indexes::partial::partial_index_with_whitespace_normalization_is_idempotent_mssql` — schema_push twice with whitespace variance in raw predicate is idempotent (no second migration) on mssql [connectors: tags:mssql; preview:partialindexes] - [ ] `migrations::indexes::partial::partial_index_with_comparison_normalization_is_idempotent_mssql` — schema_push twice with a compound-column partial index comparison predicate is idempotent on mssql [connectors: tags:mssql; preview:partialindexes] - [ ] `migrations::indexes::partial::db_partial_index_not_recreated_without_preview_feature_postgres` — manually replaces a plain index with an equivalent partial index via raw_cmd; re-push asserts no steps without the preview feature enabled (postgres) [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::partial::db_manual_partial_index_not_dropped_without_preview_feature_postgres` — manually creates a partial index via raw_cmd not declared in schema; re-push asserts no steps without preview feature (postgres) [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::partial::db_manual_partial_index_not_dropped_without_preview_feature_mssql` — manually creates a partial index via raw_cmd not declared in schema; re-push asserts no steps without preview feature (mssql) [connectors: tags:mssql] - [ ] `migrations::indexes::partial::db_manual_partial_index_not_dropped_without_preview_feature_sqlite` — manually creates a partial index via raw_cmd not declared in schema; re-push asserts no steps without preview feature (sqlite) [connectors: tags:sqlite] - [ ] `migrations::indexes::partial::db_manual_partial_index_not_dropped_without_preview_feature_cockroachdb` — manually creates a partial index via raw_cmd not declared in schema; re-push asserts no steps without preview feature (cockroachdb) [connectors: tags:cockroachdb] - [ ] `migrations::indexes::partial::db_partial_index_not_recreated_without_preview_feature_mssql` — manually replaces a plain index with an equivalent partial index via raw_cmd; re-push asserts no steps without the preview feature enabled (mssql) [connectors: tags:mssql] - [ ] `migrations::indexes::partial::db_partial_index_not_recreated_without_preview_feature_sqlite` — manually replaces a plain index with an equivalent partial index via raw_cmd; re-push asserts no steps without the preview feature enabled (sqlite) [connectors: tags:sqlite] - [ ] `migrations::indexes::partial::partial_index_with_enum_cast_is_idempotent_postgres` — schema_push twice with a raw predicate casting an enum value is idempotent (postgres) [connectors: tags:postgres; exclude:cockroachdb; preview:partialindexes] - [ ] `migrations::indexes::partial::partial_index_with_numeric_literal_cast_is_idempotent_postgres` — schema_push twice with a raw predicate comparing decimal columns without a cast is idempotent (postgres) [connectors: tags:postgres; exclude:cockroachdb; preview:partialindexes] - [ ] `migrations::indexes::partial::partial_index_with_lossy_float_to_int_cast_is_idempotent_postgres` — schema_push twice with a raw predicate casting a float literal to integer is idempotent (postgres) [connectors: tags:postgres; exclude:cockroachdb; preview:partialindexes] - [ ] `migrations::indexes::partial::partial_index_with_double_cast_truncation_is_idempotent_postgres` — schema_push twice with a raw predicate double-casting a float literal (integer::numeric) is idempotent (postgres) [connectors: tags:postgres; exclude:cockroachdb; preview:partialindexes] - [ ] `migrations::indexes::partial::partial_index_cast_type_change_triggers_migration_postgres` — forced schema_push changes the cast type in a partial index predicate and triggers a migration, then re-push is no-op (postgres) [connectors: tags:postgres; exclude:cockroachdb; preview:partialindexes] - [ ] `migrations::indexes::partial::partial_index_with_compound_and_or_predicate_is_idempotent_postgres` — schema_push twice with a compound AND/OR raw predicate is idempotent (postgres) [connectors: tags:postgres; exclude:cockroachdb; preview:partialindexes] - [ ] `migrations::indexes::partial::partial_index_object_literal_multiple_fields_is_idempotent_postgres` — schema_push twice with an object-literal where clause spanning boolean and null conditions across multiple fields is idempotent (postgres) [connectors: tags:postgres; exclude:cockroachdb; preview:partialindexes] - [ ] `migrations::indexes::partial::partial_index_object_literal_not_equals_is_idempotent_postgres` — schema_push twice with an object-literal where clause using `not` is idempotent (postgres) [connectors: tags:postgres; exclude:cockroachdb; preview:partialindexes] - [ ] `migrations::indexes::partial::partial_index_implicit_precedence_and_or_roundtrip_postgres` — schema_push twice with a raw predicate relying on implicit AND/OR precedence round-trips idempotently (postgres) [connectors: tags:postgres; exclude:cockroachdb; preview:partialindexes] - [ ] `migrations::indexes::partial::partial_index_not_with_and_or_roundtrip_postgres` — schema_push twice with a raw predicate combining NOT with AND/OR round-trips idempotently (postgres) [connectors: tags:postgres; exclude:cockroachdb; preview:partialindexes] - [ ] `migrations::indexes::partial::partial_index_object_literal_null_and_not_null_is_idempotent_postgres` — schema_push twice with an object-literal where clause combining null and not-null conditions is idempotent (postgres) [connectors: tags:postgres; exclude:cockroachdb; preview:partialindexes] ### schema-engine/sql-migration-tests/tests/migrations/indexes/postgres.rs - [ ] `migrations::indexes::postgres::hash_index` — schema_push creates a Hash-type index on an Int column; asserts non-unique index with Hash algorithm; re-push no-op [connectors: tags:postgres; exclude:cockroachdb] ### schema-engine/sql-migration-tests/tests/migrations/indexes/postgres/brin.rs - [ ] `migrations::indexes::postgres::brin::brin_change_from_btree` — schema_push creates a default BTree index on `data`, then schema_push with `type: Brin` migrates it to a BRIN index; asserts index algorithm changes from BTree to Brin [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_bit_minmax_ops` — schema_push creates a BRIN index with explicit `BitMinMaxOps` on a `Bit(1)` column; asserts algorithm Brin and ops BitMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_bit_minmax_ops_default` — schema_push creates a BRIN index with no explicit ops on a `Bit(1)` column; asserts the default ops resolve to BitMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_varbit_minmax_ops` — schema_push creates a BRIN index with explicit `VarBitMinMaxOps` on a `VarBit` column; asserts algorithm Brin and ops VarBitMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_varbit_minmax_ops_default` — schema_push creates a BRIN index with no explicit ops on a `VarBit` column; asserts default ops resolve to VarBitMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_bpchar_minmax_ops` — schema_push creates a BRIN index with explicit `BpcharMinMaxOps` on a `Char(1)` column; asserts algorithm Brin and ops BpcharMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_bpchar_minmax_ops_default` — schema_push creates a BRIN index with no explicit ops on a `Char(1)` column; asserts default ops resolve to BpcharMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_bpchar_bloom_ops` — schema_push creates a BRIN index with explicit `BpcharBloomOps` on a `Char(1)` column; asserts algorithm Brin and ops BpcharBloomOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_bytea_minmax_ops` — schema_push creates a BRIN index with explicit `ByteaMinMaxOps` on a `Bytes` column; asserts algorithm Brin and ops ByteaMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_bytea_minmax_ops_default` — schema_push creates a BRIN index with no explicit ops on a `Bytes` column; asserts default ops resolve to ByteaMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_bytea_bloom_ops` — schema_push creates a BRIN index with explicit `ByteaBloomOps` on a `Bytes` column; asserts algorithm Brin and ops ByteaBloomOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_date_minmax_ops` — schema_push creates a BRIN index with explicit `DateMinMaxOps` on a `Date` column; asserts algorithm Brin and ops DateMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_date_minmax_ops_default` — schema_push creates a BRIN index with no explicit ops on a `Date` column; asserts default ops resolve to DateMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_date_bloom_ops` — schema_push creates a BRIN index with explicit `DateBloomOps` on a `Date` column; asserts algorithm Brin and ops DateBloomOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_date_minmax_multi_ops` — schema_push creates a BRIN index with explicit `DateMinMaxMultiOps` on a `Date` column; asserts algorithm Brin and ops DateMinMaxMultiOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_real_minmax_ops` — schema_push creates a BRIN index with explicit `Float4MinMaxOps` on a `Real` (Float) column; asserts algorithm Brin and ops Float4MinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_real_minmax_ops_default` — schema_push creates a BRIN index with no explicit ops on a `Real` (Float) column; asserts default ops resolve to Float4MinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_real_bloom_ops` — schema_push creates a BRIN index with explicit `Float4BloomOps` on a `Real` (Float) column; asserts algorithm Brin and ops Float4BloomOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_real_minmax_multi_ops` — schema_push creates a BRIN index with explicit `Float4MinMaxMultiOps` on a `Real` (Float) column; asserts algorithm Brin and ops Float4MinMaxMultiOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_double_minmax_ops` — schema_push creates a BRIN index with explicit `Float8MinMaxOps` on a `Float` (double precision) column; asserts algorithm Brin and ops Float8MinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_double_minmax_ops_default` — schema_push creates a BRIN index with no explicit ops on a `Float` (double precision) column; asserts default ops resolve to Float8MinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_double_bloom_ops` — schema_push creates a BRIN index with explicit `Float8BloomOps` on a `Float` (double precision) column; asserts algorithm Brin and ops Float8BloomOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_double_minmax_multi_ops` — schema_push creates a BRIN index with explicit `Float8MinMaxMultiOps` on a `Float` (double precision) column; asserts algorithm Brin and ops Float8MinMaxMultiOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_inet_minmax_ops` — schema_push creates a BRIN index with explicit `InetMinMaxOps` on an `Inet` column; asserts algorithm Brin and ops InetMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_inet_inclusion_ops` — schema_push creates a BRIN index with explicit `InetInclusionOps` on an `Inet` column; asserts algorithm Brin and ops InetInclusionOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_inet_inclusion_ops_default` — schema_push creates a BRIN index with no explicit ops on an `Inet` column; asserts default ops resolve to InetInclusionOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_inet_bloom_ops` — schema_push creates a BRIN index with explicit `InetBloomOps` on an `Inet` column; asserts algorithm Brin and ops InetBloomOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_inet_minmax_multi_ops` — schema_push creates a BRIN index with explicit `InetMinMaxMultiOps` on an `Inet` column; asserts algorithm Brin and ops InetMinMaxMultiOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_int2_minmax_ops` — schema_push creates a BRIN index with explicit `Int2MinMaxOps` on a `SmallInt` column; asserts algorithm Brin and ops Int2MinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_int2_minmax_ops_default` — schema_push creates a BRIN index with no explicit ops on a `SmallInt` column; asserts default ops resolve to Int2MinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_int2_bloom_ops` — schema_push creates a BRIN index with explicit `Int2BloomOps` on a `SmallInt` column; asserts algorithm Brin and ops Int2BloomOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_int2_minmax_multi_ops` — schema_push creates a BRIN index with explicit `Int2MinMaxMultiOps` on a `SmallInt` column; asserts algorithm Brin and ops Int2MinMaxMultiOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_int4_minmax_ops` — schema_push creates a BRIN index with explicit `Int4MinMaxOps` on an `Int` column; asserts algorithm Brin and ops Int4MinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_int4_minmax_ops_default` — schema_push creates a BRIN index with no explicit ops on an `Int` column; asserts default ops resolve to Int4MinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_int4_bloom_ops` — schema_push creates a BRIN index with explicit `Int4BloomOps` on an `Int` column; asserts algorithm Brin and ops Int4BloomOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_int4_minmax_multi_ops` — schema_push creates a BRIN index with explicit `Int4MinMaxMultiOps` on an `Int` column; asserts algorithm Brin and ops Int4MinMaxMultiOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_int8_minmax_ops` — schema_push creates a BRIN index with explicit `Int8MinMaxOps` on a `BigInt` column; asserts algorithm Brin and ops Int8MinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_int8_minmax_ops_default` — schema_push creates a BRIN index with no explicit ops on a `BigInt` column; asserts default ops resolve to Int8MinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_int8_bloom_ops` — schema_push creates a BRIN index with explicit `Int8BloomOps` on a `BigInt` column; asserts algorithm Brin and ops Int8BloomOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_int8_minmax_multi_ops` — schema_push creates a BRIN index with explicit `Int8MinMaxMultiOps` on a `BigInt` column; asserts algorithm Brin and ops Int8MinMaxMultiOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_numeric_minmax_ops` — schema_push creates a BRIN index with explicit `NumericMinMaxOps` on a `Decimal` column; asserts algorithm Brin and ops NumericMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_numeric_minmax_ops_default` — schema_push creates a BRIN index with no explicit ops on a `Decimal` column; asserts default ops resolve to NumericMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_numeric_bloom_ops` — schema_push creates a BRIN index with explicit `NumericBloomOps` on a `Decimal` column; asserts algorithm Brin and ops NumericBloomOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_numeric_minmax_multi_ops` — schema_push creates a BRIN index with explicit `NumericMinMaxMultiOps` on a `Decimal` column; asserts algorithm Brin and ops NumericMinMaxMultiOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_oid_minmax_ops` — schema_push creates a BRIN index with explicit `OidMinMaxOps` on an `Oid` column; asserts algorithm Brin and ops OidMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_oid_minmax_ops_default` — schema_push creates a BRIN index with no explicit ops on an `Oid` column; asserts default ops resolve to OidMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_oid_bloom_ops` — schema_push creates a BRIN index with explicit `OidBloomOps` on an `Oid` column; asserts algorithm Brin and ops OidBloomOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_oid_minmax_multi_ops` — schema_push creates a BRIN index with explicit `OidMinMaxMultiOps` on an `Oid` column; asserts algorithm Brin and ops OidMinMaxMultiOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_text_minmax_ops` — schema_push creates a BRIN index with explicit `TextMinMaxOps` on a `String` (text) column; asserts algorithm Brin and ops TextMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_text_minmax_ops_varchar` — schema_push creates a BRIN index with explicit `TextMinMaxOps` on a `VarChar(420)` column; asserts algorithm Brin and ops TextMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_text_minmax_ops_default` — schema_push creates a BRIN index with no explicit ops on a `String` (text) column; asserts default ops resolve to TextMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_text_minmax_ops_default_varchar` — schema_push creates a BRIN index with no explicit ops on a `VarChar(420)` column; asserts default ops resolve to TextMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_text_bloom_ops` — schema_push creates a BRIN index with explicit `TextBloomOps` on a `String` (text) column; asserts algorithm Brin and ops TextBloomOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_text_bloom_ops_varchar` — schema_push creates a BRIN index with explicit `TextBloomOps` on a `VarChar(420)` column; asserts algorithm Brin and ops TextBloomOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_timestamp_minmax_ops` — schema_push creates a BRIN index with explicit `TimestampMinMaxOps` on a `DateTime` (timestamp) column; asserts algorithm Brin and ops TimestampMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_timestamp_minmax_ops_default` — schema_push creates a BRIN index with no explicit ops on a `DateTime` (timestamp) column; asserts default ops resolve to TimestampMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_timestamp_bloom_ops` — schema_push creates a BRIN index with explicit `TimestampBloomOps` on a `DateTime` (timestamp) column; asserts algorithm Brin and ops TimestampBloomOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_timestamp_minmax_multi_ops` — schema_push creates a BRIN index with explicit `TimestampMinMaxMultiOps` on a `DateTime` (timestamp) column; asserts algorithm Brin and ops TimestampMinMaxMultiOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_timestamptz_minmax_ops` — schema_push creates a BRIN index with explicit `TimestampTzMinMaxOps` on a `Timestamptz` column; asserts algorithm Brin and ops TimestampTzMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_timestamptz_minmax_ops_default` — schema_push creates a BRIN index with no explicit ops on a `Timestamptz` column; asserts default ops resolve to TimestampTzMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_timestamptz_bloom_ops` — schema_push creates a BRIN index with explicit `TimestampTzBloomOps` on a `Timestamptz` column; asserts algorithm Brin and ops TimestampTzBloomOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_timestamptz_minmax_multi_ops` — schema_push creates a BRIN index with explicit `TimestampTzMinMaxMultiOps` on a `Timestamptz` column; asserts algorithm Brin and ops TimestampTzMinMaxMultiOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_time_minmax_ops` — schema_push creates a BRIN index with explicit `TimeMinMaxOps` on a `Time` column; asserts algorithm Brin and ops TimeMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_time_minmax_ops_default` — schema_push creates a BRIN index with no explicit ops on a `Time` column; asserts default ops resolve to TimeMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_time_bloom_ops` — schema_push creates a BRIN index with explicit `TimeBloomOps` on a `Time` column; asserts algorithm Brin and ops TimeBloomOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_time_minmax_multi_ops` — schema_push creates a BRIN index with explicit `TimeMinMaxMultiOps` on a `Time` column; asserts algorithm Brin and ops TimeMinMaxMultiOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_timetz_minmax_ops` — schema_push creates a BRIN index with explicit `TimeTzMinMaxOps` on a `Timetz` column; asserts algorithm Brin and ops TimeTzMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_timetz_minmax_ops_default` — schema_push creates a BRIN index with no explicit ops on a `Timetz` column; asserts default ops resolve to TimeTzMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_timetz_bloom_ops` — schema_push creates a BRIN index with explicit `TimeTzBloomOps` on a `Timetz` column; asserts algorithm Brin and ops TimeTzBloomOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_timetz_minmax_multi_ops` — schema_push creates a BRIN index with explicit `TimeTzMinMaxMultiOps` on a `Timetz` column; asserts algorithm Brin and ops TimeTzMinMaxMultiOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_uuid_minmax_ops` — schema_push creates a BRIN index with explicit `UuidMinMaxOps` on a `Uuid` column; asserts algorithm Brin and ops UuidMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_uuid_minmax_ops_default` — schema_push creates a BRIN index with no explicit ops on a `Uuid` column; asserts default ops resolve to UuidMinMaxOps, then re-push is a no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_uuid_bloom_ops` — schema_push creates a BRIN index with explicit `UuidBloomOps` on a `Uuid` column; asserts algorithm Brin and ops UuidBloomOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::brin::brin_uuid_minmax_multi_ops` — schema_push creates a BRIN index with explicit `UuidMinMaxMultiOps` on a `Uuid` column; asserts algorithm Brin and ops UuidMinMaxMultiOps, then re-push is a no-op [connectors: tags:postgres14; exclude:cockroachdb] ### schema-engine/sql-migration-tests/tests/migrations/indexes/postgres/gin.rs - [ ] `migrations::indexes::postgres::gin::gin_change_from_btree` — schema_push changes an array column's default btree index to a Gin index; asserts algorithm transitions from BTree to Gin [connectors: tags:postgres; exclude:cockroachdb,postgres9] - [ ] `migrations::indexes::postgres::gin::gin_array_ops` — schema_push creates a Gin index with explicit ArrayOps opclass on an Int[] column; asserts algorithm and ops; re-push no-op [connectors: tags:postgres; exclude:cockroachdb,postgres9] - [ ] `migrations::indexes::postgres::gin::gin_array_default_ops` — schema_push creates a Gin index on a String[] @db.Uuid column without explicit ops; asserts default ArrayOps opclass; re-push no-op [connectors: tags:postgres; exclude:cockroachdb,postgres9] - [ ] `migrations::indexes::postgres::gin::gin_array_ops_default` — schema_push creates a Gin index on an Int[] column without explicit ops; asserts default ArrayOps opclass; re-push no-op [connectors: tags:postgres; exclude:cockroachdb,postgres9] - [ ] `migrations::indexes::postgres::gin::gin_jsonb_ops` — schema_push creates a Gin index with explicit JsonbOps opclass on a Json column; asserts algorithm and ops; re-push no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::gin::gin_jsonb_ops_default` — schema_push creates a Gin index on a Json column without explicit ops; asserts default JsonbOps opclass; re-push no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::gin::gin_jsonb_path_ops` — schema_push creates a Gin index with explicit JsonbPathOps opclass on a Json column; asserts algorithm and ops; re-push no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::gin::from_jsonb_ops_to_jsonb_path_ops` — schema_push migrates a Gin index opclass from JsonbOps to JsonbPathOps; asserts final ops is JsonbPathOps [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::gin::compound_index_with_different_ops` — schema_push creates a compound Gin index with different opclasses per column (JsonbOps, ArrayOps); asserts both column opclasses [connectors: tags:postgres; exclude:cockroachdb,postgres9] - [ ] `migrations::indexes::postgres::gin::gin_raw_ops` — schema_push creates a Gin index with a raw opclass string ("tsvector_ops") on an Unsupported column; asserts raw ops; re-push no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::gin::gin_raw_ops_default` — schema_push creates a Gin index on an Unsupported("tsvector") column without explicit ops; asserts default raw tsvector_ops opclass; re-push no-op [connectors: tags:postgres; exclude:cockroachdb] ### schema-engine/sql-migration-tests/tests/migrations/indexes/postgres/gist.rs - [ ] `migrations::indexes::postgres::gist::gist_change_from_btree` — schema_push changes an Inet column's default btree index to a Gist index; asserts algorithm transitions from BTree to Gist [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::gist::gist_inet_ops` — schema_push creates a Gist index with explicit InetOps opclass on a nullable Inet column; asserts algorithm and ops; re-push no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::gist::gist_raw_ops` — schema_push creates a Gist index with a raw opclass string ("tsvector_ops") on an Unsupported column; asserts raw ops; re-push no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::gist::gist_unsupported_no_ops` — schema_push creates a Gist index on an Unsupported("tsvector") column without explicit ops; asserts default raw tsvector_ops opclass; re-push no-op [connectors: tags:postgres; exclude:cockroachdb] ### schema-engine/sql-migration-tests/tests/migrations/indexes/postgres/spgist.rs - [ ] `migrations::indexes::postgres::spgist::spgist_change_from_btree` — schema_push changes a nullable Inet column's default btree index to a Gist index; asserts algorithm transitions from BTree to Gist [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::spgist::spgist_inet_ops` — schema_push creates an SpGist index with explicit InetOps opclass on a nullable Inet column; asserts algorithm and ops; re-push no-op [connectors: tags:postgres; exclude:cockroachdb,postgres9] - [ ] `migrations::indexes::postgres::spgist::spgist_inet_ops_default` — schema_push creates an SpGist index on a nullable Inet column without explicit ops; asserts default InetOps opclass; re-push no-op [connectors: tags:postgres; exclude:cockroachdb,postgres9] - [ ] `migrations::indexes::postgres::spgist::spgist_text_ops` — schema_push creates an SpGist index with explicit TextOps opclass on a String column; asserts algorithm and ops; re-push no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::spgist::spgist_text_ops_default` — schema_push creates an SpGist index on a String column without explicit ops; asserts default TextOps opclass; re-push no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::spgist::spgist_text_ops_varchar` — schema_push creates an SpGist index with explicit TextOps opclass on a String @db.VarChar(255) column; asserts algorithm and ops; re-push no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::spgist::spgist_text_ops_varchar_default` — schema_push creates an SpGist index on a String @db.VarChar(255) column without explicit ops; asserts default TextOps opclass; re-push no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::spgist::spgist_raw_ops` — schema_push creates an SpGist index with a raw opclass string ("box_ops") on an Unsupported("box") column; asserts raw ops; re-push no-op [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::indexes::postgres::spgist::spgist_raw_ops_default` — schema_push creates an SpGist index on an Unsupported("box") column without explicit ops; asserts default raw box_ops opclass; re-push no-op [connectors: tags:postgres; exclude:cockroachdb] ### schema-engine/sql-migration-tests/tests/migrations/json.rs - [ ] `migrations::json::json_fields_can_be_created` — schema_push a Json column, asserts type family (String on MariaDB, Json otherwise) and idempotent re-push [connectors: caps:json; exclude:mysql56] - [ ] `migrations::json::database_level_json_defaults_can_be_defined` — schema_push a Json column with a JSON-array string default, asserts per-connector default value/type family and idempotent re-push [connectors: caps:json; exclude:mysql56] ### schema-engine/sql-migration-tests/tests/migrations/jsonrpc.rs - [ ] `migrations::jsonrpc::test_can_connect_to_database` — jsonrpc: sends an `ensureConnectionValidity` request over the JSON-RPC handler and asserts a success response [connectors: tags:sqlite] - [ ] `migrations::jsonrpc::test_create_database` — jsonrpc: sends a `createDatabase` request over the JSON-RPC handler and asserts the response indicates success [connectors: tags:sqlite] ### schema-engine/sql-migration-tests/tests/migrations/mariadb.rs - [ ] `migrations::mariadb::foreign_keys_to_indexes_being_renamed_must_work` — schema_push User/Post with a named unique index backing an fk, inserts rows, then schema_push renaming the index name, asserts the fk still references User.name and the index is renamed [connectors: tags:mariadb] ### schema-engine/sql-migration-tests/tests/migrations/mark_migration_applied_tests.rs - [ ] `migrations::mark_migration_applied_tests::mark_migration_applied_on_an_empty_database_works` — markMigrationApplied: on an empty database, records the migration as applied without executing it and asserts only the migrations table exists [connectors: all] - [ ] `migrations::mark_migration_applied_tests::mark_migration_applied_on_a_non_empty_database_works` — markMigrationApplied: after applying an initial migration, marks a second migration applied and asserts both are recorded but the second's schema wasn't executed [connectors: all] - [ ] `migrations::mark_migration_applied_tests::mark_migration_applied_when_the_migration_is_already_applied_errors` — markMigrationApplied: marking an already-applied migration errors with a message stating it is already recorded as applied [connectors: all] - [ ] `migrations::mark_migration_applied_tests::mark_migration_applied_when_the_migration_is_failed` — markMigrationApplied: on a migration that previously failed to apply, marks it applied and asserts a new "finished" record is added alongside the rolled-back failed record [connectors: all] - [ ] `migrations::mark_migration_applied_tests::baselining_should_work` — markMigrationApplied: baselines an already-pushed schema by creating a matching migration and marking it applied, asserting the migrations table is added without altering existing tables [connectors: all] - [ ] `migrations::mark_migration_applied_tests::must_return_helpful_error_on_migration_not_found` — markMigrationApplied: marking a nonexistent migration name errors with MigrationToMarkAppliedNotFound, while the correct name succeeds [connectors: all] ### schema-engine/sql-migration-tests/tests/migrations/mark_migration_rolled_back_tests.rs - [ ] `migrations::mark_migration_rolled_back_tests::mark_migration_rolled_back_on_an_empty_database_errors` — markMigrationRolledBack: on a database without a migrations table, errors with an invariant-violation message [connectors: all] - [ ] `migrations::mark_migration_rolled_back_tests::mark_migration_rolled_back_on_a_database_with_migrations_table_errors` — markMigrationRolledBack: on a database with an initialized migrations table but no matching migration, errors with CannotRollBackUnappliedMigration [connectors: all] - [ ] `migrations::mark_migration_rolled_back_tests::mark_migration_rolled_back_with_a_failed_migration_works` — markMigrationRolledBack: marks a failed migration as rolled back and asserts its record shows rolled_back_at set and finished_at unset [connectors: all] - [ ] `migrations::mark_migration_rolled_back_tests::mark_migration_rolled_back_with_a_successful_migration_errors` — markMigrationRolledBack: marking a successfully-applied migration as rolled back errors because it is not in a failed state [connectors: all] - [ ] `migrations::mark_migration_rolled_back_tests::rolling_back_applying_again_then_rolling_back_again_should_error` — markMigrationRolledBack: rolls back a failed migration, reapplies it successfully, then marking it rolled back again is a no-op that leaves the successful/rolled-back records unchanged [connectors: all] ### schema-engine/sql-migration-tests/tests/migrations/migrate_lock.rs - [ ] `migrations::migrate_lock::create_migration_with_new_provider_errors` — migration_lock: creating a migration with a datasource provider different from the existing migrations_lock.toml provider errors with ProviderSwitchedError [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::migrate_lock::migration_lock_with_different_comment_shapes_work` — migration_lock: various comment formats/placements in migration_lock.toml around `provider = "sqlite"` are all correctly parsed and still yield a ProviderSwitchedError on mismatch [connectors: tags:postgres; exclude:cockroachdb] ### schema-engine/sql-migration-tests/tests/migrations/migration_persistence_tests.rs - [ ] `migrations::migration_persistence_tests::starting_a_migration_works` — migration persistence: recording a migration as started stores the correct checksum, name, started_at and zero applied_steps_count with no finished_at [connectors: all] - [ ] `migrations::migration_persistence_tests::finishing_a_migration_works` — migration persistence: recording a migration as started then finished stores correct checksum/name and timestamps within a bounded duration [connectors: all] - [ ] `migrations::migration_persistence_tests::updating_then_finishing_a_migration_works` — migration persistence: recording a successful step before finishing increments applied_steps_count to 1 and finishes correctly [connectors: all] - [ ] `migrations::migration_persistence_tests::multiple_successive_migrations_work` — migration persistence: two successive migrations (one finished, one still in progress) are both listed with correct checksums, names and step counts [connectors: all] - [ ] `migrations::migration_persistence_tests::starting_a_migration_on_a_non_empty_database_errors` — migration persistence: initializing the migrations table on a database that already has tables errors with P3005 "schema is not empty" [connectors: all] - [ ] `migrations::migration_persistence_tests::starting_a_migration_on_db_with_existing_external_table_does_not_errors` — migration persistence: initializing with a schema filter that excludes an existing external table succeeds without error [connectors: all] ### schema-engine/sql-migration-tests/tests/migrations/mssql.rs - [ ] `migrations::mssql::reset_clears_udts` — raw_cmd creates a user-defined table type, asserts it exists via sys.types, then reset() and asserts the UDT is gone [connectors: tags:mssql] - [ ] `migrations::mssql::shared_default_constraints_are_ignored_issue_5423` — raw_cmd creates a shared MSSQL DEFAULT object bound via sp_bindefault, schema_push a matching schema asserts green with no steps (shared default ignored) [connectors: tags:mssql] - [ ] `migrations::mssql::shared_default_constraints_with_multilines_are_ignored_issue_24275` — same as above but the DEFAULT object's definition contains a comment/multiline text, asserts green with no steps [connectors: tags:mssql] - [ ] `migrations::mssql::mssql_apply_migrations_error_output` — apply_migrations with a migration that drops a nonexistent table, asserts the error message reports MSSQL error code 3701 [connectors: tags:mssql] - [ ] `migrations::mssql::foreign_key_renaming_to_default_works` — connector_diff from the live db to a datamodel that only renames the fk constraint, asserts the generated SQL is a sp_rename RenameForeignKey, applies it via raw_cmd, then schema_push asserts idempotency [connectors: tags:mssql] - [ ] `migrations::mssql::prisma_9537` — schema_push an initial User model then schema_push an expanded schema adding Post with an fk to User, asserts both pushes are green (regression for duplicate fk creation on table redefinition) [connectors: tags:mssql] - [ ] `migrations::mssql::bigint_defaults_work` — expect_sql_for_schema asserts CREATE TABLE SQL for a BigInt @default(0) column on MSSQL, then schema_push twice asserts idempotency [connectors: tags:mssql] - [ ] `migrations::mssql::float_columns` — expect_sql_for_schema asserts CREATE TABLE SQL for Float/Real native-typed columns with defaults, then schema_push twice asserts idempotency [connectors: tags:mssql] - [ ] `migrations::mssql::apply_migrations_with_a_schema_in_url` — reconfigures the connector with schema=myschema in the connection string, applies a hand-authored migration creating a table in that schema, asserts applied_migrations, no drift via diagnose_migration_history, and schema_push idempotency [connectors: tags:mssql] ### schema-engine/sql-migration-tests/tests/migrations/mssql/multi_schema.rs - [ ] `migrations::mssql::multi_schema::multi_schema_tests` — table-driven top-level test that runs a list of TestData cases (basic, idempotence, mapped table, add/remove table, rename column, add default, autoincrement pk, recreate not-null column, rename pk, move table across namespaces, rename index, add unique, one-to-one/one-to-many/many-to-many cross-namespace relations, self-relations, drop fk/index/view, modify pk) via schema_push across two MSSQL @@schema namespaces, asserting each case's table/column/fk/index state [connectors: tags:mssql,mssql2019,mssql2017; namespaces:one,two] - [ ] `migrations::mssql::multi_schema::multi_schema_migration` — create_migration + apply_migrations for a schema with two cross-referencing models in separate @@schema namespaces, asserts the migration applies once and is idempotent on reapply [connectors: tags:mssql; namespaces:one,two] - [ ] `migrations::mssql::multi_schema::migration_with_shadow_database` — creates a shadow database and configures shadow-db namespaces, create_migration asserts the generated CreateSchema/CreateTable/AddForeignKey script matches expected and applies cleanly via apply_migrations [connectors: tags:mssql; namespaces:one,two] ### schema-engine/sql-migration-tests/tests/migrations/mysql.rs - [ ] `migrations::mysql::indexes_on_foreign_key_fields_are_not_created_twice` — schema_push Human/Cat with an fk on catname, asserts exactly one fk and one (non-duplicated) index on catname, then re-push asserts no further steps [connectors: tags:mysql; exclude:vitess] - [ ] `migrations::mysql::enum_creation_is_idempotent` — schema_push Cat/Human sharing enum Mood, re-push the same schema asserts green with no steps [connectors: tags:mysql] - [ ] `migrations::mysql::enums_work_when_table_name_is_remapped` — schema_push a User model with an @@map'd table and @map'd enum column, asserts green [connectors: tags:mysql] - [ ] `migrations::mysql::arity_of_enum_columns_can_be_changed` — schema_push model A with required/optional enum columns, asserts arity, then flips required/optional and reasserts [connectors: tags:mysql] - [ ] `migrations::mysql::arity_is_preserved_by_alter_enum` — schema_push model A with enum Color, then force schema_push renamed enum values, asserts executable/executed steps and arity preserved [connectors: tags:mysql] - [ ] `migrations::mysql::native_type_columns_can_be_created` — schema_push model A with many MySQL @db native types, asserts each column's full data type matches expected, then re-push asserts idempotent (no steps) [connectors: tags:mysql] - [ ] `migrations::mysql::default_current_timestamp_precision_follows_column_precision` — create_migration for a DateTime(7) @default(now()) column, asserts the generated SQL's DEFAULT CURRENT_TIMESTAMP(7) matches the column precision [connectors: tags:mysql] - [ ] `migrations::mysql::default_current_timestamp_precision_follows_column_precision_when_unspecified` — create_migration for a DateTime() @default(now()) column with unspecified precision, asserts the generated SQL uses an unqualified DEFAULT CURRENT_TIMESTAMP [connectors: tags:mysql] - [ ] `migrations::mysql::datetime_dbgenerated_defaults` — create_migration for columns with dbgenerated date/datetime/time defaults, asserts the generated CREATE TABLE SQL matches the expected literal defaults [connectors: tags:mysql] - [ ] `migrations::mysql::mysql_apply_migrations_errors_gives_the_failed_sql` — apply_migrations with a migration referencing a nonexistent table, asserts the error message reports the failing query/table per platform (Vitess/windows/other) [connectors: tags:mysql] - [ ] `migrations::mysql::dropping_m2m_relation_from_datamodel_works` — calls schema_core's diff directly (not TestApi) between two datamodels that drop an implicit m2m relation, asserts the generated diff drops the join table and its two fks [connectors: n/a (plain #[test])] - [ ] `migrations::mysql::alter_constraint_name` — create_migration, then create_migration again after renaming unique/index/fk constraints via `map:`, asserts the "custom" migration renames indexes/fk (RenameIndex vs RedefineIndex depending on MySQL 5.6/MariaDB) [connectors: tags:mysql; exclude:vitess (non-windows)] - [ ] `migrations::mysql::bigint_defaults_work` — expect_sql_for_schema asserts CREATE TABLE SQL for a BigInt @default(0) column, then schema_push twice asserts green/no-steps idempotency [connectors: tags:mysql] - [ ] `migrations::mysql::foreign_keys_covered_by_deleted_index_are_recreated` — schema_push Transaction with a @@unique covering its fk columns, asserts fk+unique index, then schema_push without the @@unique, asserts the fk is recreated backed by a non-unique index, and connector_diff SQL matches the expected drop/recreate [connectors: tags:mysql; exclude:vitess] - [ ] `migrations::mysql::foreign_keys_covered_by_deleted_index_are_also_deleted` — schema_push Transaction with fk+@@unique, then schema_push removing the fk fields entirely, asserts fks/indexes drop to zero and connector_diff SQL contains only the drop statements [connectors: tags:mysql; exclude:vitess] ### schema-engine/sql-migration-tests/tests/migrations/postgres.rs - [ ] `migrations::postgres::enums_can_be_dropped_on_postgres` — schema_push creates an enum-typed column then removes it, asserting the enum is dropped from the schema [connectors: tags:postgres] - [ ] `migrations::postgres::existing_postgis_tables_must_not_be_migrated` — raw-created PostGIS system tables are left untouched by an empty schema_push [connectors: tags:postgres] - [ ] `migrations::postgres::existing_postgis_views_must_not_be_migrated` — raw-created PostGIS system views are left untouched by an empty schema_push [connectors: tags:postgres] - [ ] `migrations::postgres::native_type_columns_can_be_created` — schema_push creates a table covering every Postgres native column type and asserts each column's full_data_type, then reapplies with no steps [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::postgres::uuids_do_not_generate_drift_issue_5282` — introspection-derived schema for uuid-default columns with a foreign key produces no drift on schema_push [connectors: tags:postgres] - [ ] `migrations::postgres::functions_with_schema_prefix_in_dbgenerated_are_idempotent` — a dbgenerated() default referencing a schema-qualified extension function is idempotent across repeated schema_push [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::postgres::postgres_apply_migrations_errors_give_precise_location` — apply_migrations on a migration with a bad statement reports the exact source line/column of the failing SQL [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::postgres::postgres_apply_migrations_errors_give_precise_location_without_final_semicolon` — same precise-location error assertion for a migration file missing the trailing semicolon [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::postgres::postgres_apply_migrations_errors_give_precise_location_with_immediate_eof` — same precise-location error assertion for a migration file ending immediately at EOF [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::postgres::postgres_apply_migrations_errors_give_precise_location_with_invalid_syntax` — apply_migrations on a migration with invalid trailing syntax reports the precise error position [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::postgres::postgres_apply_migrations_errors_give_precise_location_at_the_beginning_of_files` — apply_migrations on a migration failing on its first statements reports the precise error position at file start [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::postgres::citext_to_text_and_back_works` — schema_push migrates a column between Text and Citext types with data present, asserting row values survive both directions [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::postgres::foreign_key_renaming_to_default_works` — connector_diff renames a foreign key constraint to Prisma's default naming convention and the migration applies and is idempotent [connectors: tags:postgres] - [ ] `migrations::postgres::failing_enum_migrations_should_not_be_partially_applied` — schema_push removing an enum variant still in use rolls back, leaving data and the enum's original values intact [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::postgres::connecting_to_a_postgres_database_with_the_cockroach_connector_fails` — ensure_connection_validity against a postgres database with provider "cockroachdb" fails with a provider-mismatch error [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::postgres::scalar_list_defaults_work` — schema_push creates a model with array-typed columns and array literal defaults across many scalar types, generating the expected CREATE TABLE SQL [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::postgres::scalar_list_default_diffing` — connector_diff between two schemas with differing array column defaults generates the expected ALTER TABLE SET DEFAULT statements and applies [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::postgres::json_defaults_with_escaped_quotes_work` — schema_push of a Json column default containing escaped quotes generates the expected CREATE TABLE SQL and is idempotent [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::postgres::bigint_defaults_work` — schema_push of a BigInt column with a numeric default generates the expected CREATE TABLE SQL and is idempotent [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::postgres::dbgenerated_on_generated_columns_is_idempotent` — a raw-created STORED generated text column mapped via @default(dbgenerated()) produces no schema_push steps [connectors: tags:postgres12; exclude:cockroachdb] - [ ] `migrations::postgres::dbgenerated_on_generated_unsupported_columns_is_idempotent` — a raw-created STORED tsvector generated column mapped as Unsupported with dbgenerated() produces no schema_push steps [connectors: tags:postgres12; exclude:cockroachdb] - [ ] `migrations::postgres::default_schema_not_included_when_dropping_items` — connector_diff dropping an index then dropping remaining tables/enum omits the default schema name from generated statements [connectors: tags:postgres; preview:views] - [ ] `migrations::postgres::postgres_create_index_concurrently_works` — apply_migrations applies a hand-written migration containing CREATE INDEX CONCURRENTLY successfully [connectors: tags:postgres] - [ ] `migrations::postgres::postgres_create_migration_works_with_multiple_create_index_concurrently_statements` — create_migration after a draft migration with multiple CREATE INDEX CONCURRENTLY statements generates the expected follow-up ALTER TABLE SQL [connectors: tags:postgres] ### schema-engine/sql-migration-tests/tests/migrations/postgres/extensions.rs - [ ] `migrations::postgres::extensions::extensions_can_be_created` — schema_push with a citext datasource extension creates it, asserted via assert_has_extension [connectors: tags:postgres; exclude:cockroachdb; preview:postgresqlextensions] - [ ] `migrations::postgres::extensions::multiple_extensions_can_be_created` — schema_push with citext and pg_trgm datasource extensions creates both [connectors: tags:postgres; exclude:cockroachdb; preview:postgresqlextensions] - [ ] `migrations::postgres::extensions::mapped_extensions_can_be_created` — schema_push with a uuid_ossp extension mapped to "uuid-ossp" creates the extension under its mapped name [connectors: tags:postgres; exclude:cockroachdb; preview:postgresqlextensions] - [ ] `migrations::postgres::extensions::extensions_can_be_created_with_a_version` — schema_push with citext(version: "1.5") creates the extension and asserts its version [connectors: tags:postgres14; exclude:cockroachdb; preview:postgresqlextensions] - [ ] `migrations::postgres::extensions::extension_version_can_be_changed` — schema_push upgrades an extension's declared version from 1.5 to 1.6 and asserts the new version [connectors: tags:postgres14; exclude:cockroachdb; preview:postgresqlextensions] - [ ] `migrations::postgres::extensions::extension_version_does_not_change_on_empty` — schema_push with a versionless extension declaration leaves an already-versioned extension unchanged and produces no steps [connectors: tags:postgres14; exclude:cockroachdb; preview:postgresqlextensions] - [ ] `migrations::postgres::extensions::extension_schema_can_be_defined` — schema_push creates an extension in an explicitly declared non-default schema and asserts its schema [connectors: tags:postgres; exclude:cockroachdb; preview:postgresqlextensions] - [ ] `migrations::postgres::extensions::relocatable_extension_can_be_relocated` — schema_push moves a relocatable extension between schemas and asserts its new schema each time [connectors: tags:postgres; exclude:cockroachdb; preview:postgresqlextensions] - [ ] `migrations::postgres::extensions::non_relocatable_extension_can_be_relocated` — schema_push moves a non-relocatable extension (xml2) between schemas and asserts its new schema each time [connectors: tags:postgres14; exclude:cockroachdb; preview:postgresqlextensions] - [ ] `migrations::postgres::extensions::removing_schema_definition_does_nothing` — schema_push removing an explicit schema clause from an extension declaration produces no steps and keeps the extension in its original schema [connectors: tags:postgres; exclude:cockroachdb; preview:postgresqlextensions] - [ ] `migrations::postgres::extensions::extension_functions_can_be_used_in_the_same_migration` — schema_push creates an extension and a table using dbgenerated() calling that extension's function in the same migration [connectors: tags:postgres; exclude:cockroachdb; preview:postgresqlextensions] - [ ] `migrations::postgres::extensions::create_table_with_extension_types` — schema_push with a configured ExtensionTypeConfig creates a table using a custom extension column type (vector) and asserts its native type [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::postgres::extensions::diff_extension_type_changed_modifiers` — connector_diff between two schemas using different extension-typed columns (Vector3/Vector4) generates the expected ALTER COLUMN SET DATA TYPE [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::postgres::extensions::diff_extension_type_unchanged_modifiers` — connector_diff between identical extension-typed column schemas yields an empty migration [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::postgres::extensions::diff_extension_type_changed_db_type_modifiers` — connector_diff for an extension type whose db.vector() type modifier changes generates the expected ALTER COLUMN SET DATA TYPE [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::postgres::extensions::diff_extension_type_unchanged_db_type_modifiers` — connector_diff for an unchanged db.vector() type modifier yields an empty migration [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::postgres::extensions::diff_unchanged_unsupported_type` — connector_diff between a raw-created vector column and its Unsupported-typed introspected equivalent yields an empty migration [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::postgres::extensions::diff_changed_unsupported_type` — connector_diff between a raw-created geometry column and an Unsupported("vector") schema currently yields an empty migration (unsupported-type diffing limitation) [connectors: tags:postgres; exclude:cockroachdb] ### schema-engine/sql-migration-tests/tests/migrations/postgres/introspection.rs - [ ] `migrations::postgres::introspection::introspect_partition_tables` — introspect a raw-created RANGE-partitioned table with a self-referencing FK, asserting the generated schema documents it as a partition table [connectors: n/a (plain #[test])] - [ ] `migrations::postgres::introspection::inherited_table_regression_fix` — introspect raw-created PostgreSQL table inheritance (capitals INHERITS cities), asserting the generated schema documents the inheritance-only parent table [connectors: n/a (plain #[test])] - [ ] `migrations::postgres::introspection::inherited_table_detect_primary_key` — introspect an inherited table lacking a primary key, asserting the generated schema marks the child model @@ignore for missing a unique identifier [connectors: n/a (plain #[test])] ### schema-engine/sql-migration-tests/tests/migrations/postgres/multi_schema.rs - [ ] `migrations::postgres::multi_schema::apply_migrations_with_multiple_schemas_where_one_is_search_path_with_a_foreign_key` — create_migration and apply_migrations for models split across the "one" and "public" (search_path) namespaces with a cross-namespace foreign key, asserting applied migrations and idempotent reapply [connectors: tags:postgres] - [ ] `migrations::postgres::multi_schema::multi_schema_tests` — table-driven runner executing a suite of named multi-schema scenarios (create/rename/drop tables, columns, enums, indexes, FKs, relations) across the "one" and "two" namespaces via schema_push, asserting each scenario's resulting schema [connectors: tags:postgres] - [ ] `migrations::postgres::multi_schema::migration_with_shadow_database` — create_migration and apply_migrations using a shadow database for cross-namespace models with relations, asserting the generated CreateSchema/CreateTable/AddForeignKey SQL and successful application [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::postgres::multi_schema::migration_without_schema_change` — create_migration run twice with an unchanged schema creates only one migration directory [connectors: tags:postgres; exclude:cockroachdb; preview:multischema] - [ ] `migrations::postgres::multi_schema::schema_push_with_multi_schema_should_ignore_default_schema` — schema_push with an explicit schemas=["one"] datasource ignores a pre-existing table in the default schema, leaving it undropped [connectors: tags:postgres,mssql; exclude:cockroachdb; preview:multischema] ### schema-engine/sql-migration-tests/tests/migrations/relation_mode.rs - [ ] `migrations::relation_mode::schema_push_referential_integrity_prisma_works` — schema_push with relationMode="prisma" asserts no FK constraints created in db, idempotent [connectors: all] - [ ] `migrations::relation_mode::create_migration_referential_integrity_prisma_works` — create_migration/apply_migrations with relationMode="prisma" asserts idempotent migration dir, no drift, no db FKs [connectors: all] - [ ] `migrations::relation_mode::switching_from_foreign_keys_to_prisma_integrity_drops_the_foreign_keys` — schema_push switching relationMode foreignKeys→prisma drops existing db FK constraint [connectors: exclude:vitess] - [ ] `migrations::relation_mode::switching_from_prisma_integrity_to_foreign_keys_drops_the_foreign_keys` — schema_push switching relationMode prisma→foreignKeys adds db FK constraint [connectors: exclude:vitess] ### schema-engine/sql-migration-tests/tests/migrations/relations.rs - [ ] `migrations::relations::adding_a_many_to_many_relation_must_result_in_a_prisma_style_relation_table` — schema_push creates `_AToB` join table with FKs cascading both ways, idempotent on re-push [connectors: exclude:vitess] - [ ] `migrations::relations::adding_a_many_to_many_relation_with_custom_name_must_work` — schema_push creates custom-named `_my_relation` join table with two FKs [connectors: exclude:vitess] - [ ] `migrations::relations::adding_an_inline_relation_must_result_in_a_foreign_key_in_the_model_table` — schema_push adds required/optional FK columns with correct references and delete action [connectors: exclude:vitess] - [ ] `migrations::relations::specifying_a_db_name_for_an_inline_relation_must_work` — schema_push with `@map` on FK field creates FK on mapped column name [connectors: exclude:vitess] - [ ] `migrations::relations::changing_the_type_of_a_field_referenced_by_a_fk_must_work` — schema_push changes FK column type from Int to String and re-adds FK referencing unique column [connectors: exclude:vitess] - [ ] `migrations::relations::adding_an_inline_relation_to_a_model_with_an_exotic_id_type` — schema_push adds FK referencing a String cuid id, asserts action and reference [connectors: exclude:vitess] - [ ] `migrations::relations::removing_an_inline_relation_must_work` — schema_push removes relation field, asserts FK/index/column dropped [connectors: exclude:vitess] - [ ] `migrations::relations::compound_foreign_keys_should_work_in_correct_order` — schema_push creates compound FK preserving field order matching referenced compound id [connectors: exclude:vitess] - [ ] `migrations::relations::moving_an_inline_relation_to_the_other_side_must_work` — schema_push moves FK from table A to table B, asserts FK moved and old side cleared [connectors: exclude:vitess] - [ ] `migrations::relations::relations_can_reference_arbitrary_unique_fields` — schema_push creates FK referencing a non-id unique field [connectors: exclude:vitess] - [ ] `migrations::relations::relations_can_reference_arbitrary_unique_fields_with_maps` — schema_push creates FK referencing mapped unique field/table names [connectors: exclude:vitess] - [ ] `migrations::relations::relations_can_reference_multiple_fields` — schema_push creates compound FK referencing a multi-field unique constraint [connectors: exclude:vitess] - [ ] `migrations::relations::a_relation_with_mappings_on_both_sides_can_reference_multiple_fields` — schema_push creates compound FK with `@map` on both referencing and referenced columns [connectors: exclude:vitess] - [ ] `migrations::relations::relations_with_mappings_on_referenced_side_can_reference_multiple_fields` — schema_push creates compound FK with `@map` only on referenced side [connectors: exclude:vitess] - [ ] `migrations::relations::relations_with_mappings_on_referencing_side_can_reference_multiple_fields` — schema_push creates compound FK with `@map` only on referencing side [connectors: exclude:vitess] - [ ] `migrations::relations::on_delete_referential_actions_should_work` — schema_push loops SetNull/Cascade/NoAction onDelete actions, asserts each FK action then resets [connectors: exclude:vitess,cockroachdb] - [ ] `migrations::relations::on_delete_set_default_should_work` — schema_push sets onDelete SetDefault, asserts FK delete action is SetDefault [connectors: exclude:mysql56,mysql57,mariadb,mssql,vitess,cockroachdb] - [ ] `migrations::relations::on_delete_restrict_should_work` — schema_push sets onDelete Restrict, asserts FK delete action is Restrict [connectors: exclude:mssql,vitess] - [ ] `migrations::relations::on_update_referential_actions_should_work` — schema_push loops NoAction/SetNull/Cascade onUpdate actions on BigInt ids, asserts each FK update action [connectors: exclude:vitess] - [ ] `migrations::relations::on_update_set_default_should_work` — schema_push sets onUpdate SetDefault, asserts FK update action is SetDefault [connectors: exclude:mysql56,mysql57,mariadb,mssql,vitess,cockroachdb] - [ ] `migrations::relations::on_update_restrict_should_work` — schema_push sets onUpdate Restrict, asserts FK update action is Restrict [connectors: exclude:mssql,vitess] - [ ] `migrations::relations::on_delete_required_default_action` — schema_push with no explicit onDelete on required relation defaults FK delete action to Restrict [connectors: exclude:mssql,vitess] - [ ] `migrations::relations::on_delete_required_default_action_with_no_restrict` — schema_push on Mssql with required relation defaults FK delete action to NoAction (no Restrict support) [connectors: tags:mssql] - [ ] `migrations::relations::on_delete_optional_default_action` — schema_push with no explicit onDelete on optional relation defaults FK delete action to SetNull [connectors: exclude:vitess] - [ ] `migrations::relations::on_delete_compound_optional_optional_default_action` — schema_push with compound optional/optional FK defaults delete action to SetNull [connectors: exclude:vitess] - [ ] `migrations::relations::on_delete_compound_required_optional_default_action_with_restrict` — schema_push with compound optional/required FK defaults delete action to Restrict [connectors: exclude:mssql,vitess] - [ ] `migrations::relations::on_delete_compound_required_optional_default_action_without_restrict` — schema_push on Mssql with compound optional/required FK defaults delete action to NoAction [connectors: tags:mssql] - [ ] `migrations::relations::on_update_optional_default_action` — schema_push with no explicit onUpdate on optional relation defaults FK update action to Cascade [connectors: exclude:vitess] - [ ] `migrations::relations::on_update_required_default_action` — schema_push with no explicit onUpdate on required relation defaults FK update action to Cascade [connectors: exclude:vitess] - [ ] `migrations::relations::adding_mutual_references_on_existing_tables_works` — schema_push forces adding mutually-referencing FKs on existing tables, asserts green or unique-constraint warnings [connectors: exclude:vitess,cockroachdb] - [ ] `migrations::relations::migrations_with_many_to_many_related_models_must_not_recreate_indexes` — schema_push twice on m:n schema, asserts join table pk/index preserved without recreation, idempotent [connectors: all] - [ ] `migrations::relations::removing_a_relation_field_must_work` — schema_push removes relation field/FK column, asserts mapped column dropped [connectors: all] - [ ] `migrations::relations::references_to_models_with_compound_primary_keys_must_work` — schema_push creates FK referencing a compound primary key [connectors: exclude:vitess] - [ ] `migrations::relations::join_tables_between_models_with_compound_primary_keys_must_work` — schema_push creates manual join table referencing compound pk plus single-column pk with unique/index constraints [connectors: exclude:vitess] - [ ] `migrations::relations::join_tables_between_models_with_mapped_compound_primary_keys_must_work` — schema_push creates join table referencing `@map`-renamed compound pk columns [connectors: exclude:vitess] ### schema-engine/sql-migration-tests/tests/migrations/relations/cockroachdb.rs - [ ] `migrations::relations::cockroachdb::adding_mutual_references_on_existing_tables_works` — schema_push forces adding mutually-referencing FKs on CockroachDB, asserts unique-constraint warnings [connectors: tags:cockroachdb] ### schema-engine/sql-migration-tests/tests/migrations/relations/vitess.rs - [ ] `migrations::relations::vitess::adding_mutual_references_on_existing_tables_works` — schema_push forces adding mutually-referencing FKs on Vitess, asserts green (sqlite) or unique-constraint warnings [connectors: tags:vitess] ### schema-engine/sql-migration-tests/tests/migrations/reset_tests.rs - [ ] `migrations::reset_tests::reset_works` — reset: after schema_push and inserting a row, reset drops all tables, and a subsequent schema_push recreates them [connectors: all] - [ ] `migrations::reset_tests::reset_then_apply_with_migrations_directory_works` — reset: after applying migrations and inserting a row, reset drops all tables, and reapplying the migrations directory recreates them [connectors: all] - [ ] `migrations::reset_tests::reset_then_diagnostics_with_migrations_directory_works` — reset: after reset, diagnose_migration_history and evaluate_data_loss succeed and apply_migrations recreates the schema [connectors: all] - [ ] `migrations::reset_tests::multi_schema_reset` — reset: with multiple Postgres namespaces, reset scoped to PSL namespaces drops only those namespaces' tables while leaving unrelated tables/search_path schema intact, and a subsequent schema_push succeeds [connectors: tags:postgres; exclude:cockroachdb] ### schema-engine/sql-migration-tests/tests/migrations/schema_filter.rs - [ ] `migrations::schema_filter::schema_filter_migration_adding_external_table` — create_migration_with_filter marking ExternalTable external, asserts zero migration directories generated and the table absent from the db [connectors: all] - [ ] `migrations::schema_filter::schema_filter_migration_removing_external_table` — schema_push creates ExternalTable, then create_migration_with_filter removes it while marked external, asserts no migration generated and table still present [connectors: all] - [ ] `migrations::schema_filter::schema_filter_migration_removing_external_table_with_contents` — schema_push creates Cat and inserts rows, evaluate_data_loss_with_filter marks Cat external, asserts no data-loss warnings [connectors: all] - [ ] `migrations::schema_filter::schema_filter_migration_modifying_external_table` — schema_push creates ExternalTable, create_migration_with_filter adds a column while table marked external, asserts no migration generated and column count unchanged [connectors: all] - [ ] `migrations::schema_filter::schema_filter_migration_adding_external_enum` — create_migration_with_filter marks an enum external, asserts zero migrations generated and the enum absent from the db [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::schema_filter::schema_filter_migration_removing_external_enum` — schema_push creates an enum, create_migration_with_filter marks it external on removal, asserts no migration generated and enum values unchanged [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::schema_filter::schema_filter_migration_adding_external_tables_incl_relations` — create_migration_with_filter with two external related tables plus a non-external Cat, asserts generated script only creates Cat (with fk to the external table), matched per-dialect [connectors: exclude:cockroachdb,vitess] - [ ] `migrations::schema_filter::schema_filter_migration_removing_external_tables_incl_relations` — after an initial migration, create_migration_with_filter drops relations to now-external tables, asserts the "remove" script only touches cat's fk/column, matched per-dialect [connectors: exclude:cockroachdb,vitess] - [ ] `migrations::schema_filter::schema_filter_migration_modifying_external_tables_incl_relations` — after an initial migration, create_migration_with_filter adds relations to external tables, asserts the "modify" script only adds cat's column/fk, matched per-dialect [connectors: exclude:cockroachdb,vitess] - [ ] `migrations::schema_filter::schema_filter_leveraging_init_script` — create_migration_with_filter with an init_script pre-creating the external table in the shadow db, asserts the generated migration only creates Cat with an fk to the externally-created table, matched per-dialect [connectors: exclude:cockroachdb,vitess] - [ ] `migrations::schema_filter::schema_filter_migration_multi_schema_requires_namespaced_table_names` — create_migration_with_filter using a fully-qualified "two.ExternalTable" filter across two @@schema namespaces, asserts the generated migration only creates the "one" schema/table, matched per-dialect [connectors: tags:postgres,mssql; exclude:cockroachdb] - [ ] `migrations::schema_filter::schema_filter_without_namespaced_table_names_on_pg_and_sql_server` — create_migration_with_filter using a non-namespaced table name on Postgres/Mssql (which require namespacing), asserts error code P3023 [connectors: tags:postgres,mssql; exclude:cockroachdb] - [ ] `migrations::schema_filter::schema_filter_with_namespaced_table_names_on_other_dialects` — create_migration_with_filter using a namespaced table name on dialects that forbid namespacing, asserts error code P3024 [connectors: exclude:postgres,mssql,cockroachdb] - [ ] `migrations::schema_filter::schema_filter_migration_dev_diagnostic_drift_detection` — raw_cmd creates a table absent from the schema but marked external, dev_diagnostic_with_filter asserts it is still classified as a create-migration (not drift) [connectors: all] ### schema-engine/sql-migration-tests/tests/migrations/shadow_database_url_configuration.rs - [ ] `migrations::shadow_database_url_configuration::shadow_db_url_can_be_configured_on_postgres` — shadow-db: a low-privilege user (can't CREATE DATABASE) can create and apply migrations using an explicitly configured custom shadow database url [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::shadow_database_url_configuration::shadow_db_url_must_not_match_main_url` — shadow-db: configuring the shadow database url identical to the main url errors, while a distinct shadow db url on the same server works [connectors: tags:postgres] - [ ] `migrations::shadow_database_url_configuration::shadow_db_not_reachable_error_must_have_the_right_connection_info` — shadow-db: pointing the shadow database url at an unreachable port produces a DatabaseNotReachable error with the correct host:port in the message [connectors: tags:postgres,mysql] ### schema-engine/sql-migration-tests/tests/migrations/soft_resets.rs - [ ] `migrations::soft_resets::soft_resets_work_on_postgres` — soft-reset: a low-privilege Postgres user (no DROP DATABASE rights) can soft-reset via migrations and via schema_push, dropping and recreating tables/views without a full db drop [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::soft_resets::soft_resets_work_on_sql_server` — soft-reset: a low-privilege SQL Server user can soft-reset via migrations and schema_push, dropping custom types/views/tables without database-level DROP privileges [connectors: tags:mssql] - [ ] `migrations::soft_resets::soft_resets_work_on_mysql` — soft-reset: a low-privilege MySQL user (limited DROP grants) can soft-reset and then schema_push to recreate tables [connectors: tags:mysql; exclude:mysql56,vitess] - [ ] `migrations::soft_resets::soft_resets_does_not_drop_external_tables` — soft-reset: with a namespaced schema filter excluding an external table, a soft reset leaves that external table intact [connectors: all] ### schema-engine/sql-migration-tests/tests/migrations/sql.rs - [ ] `migrations::sql::can_handle_reserved_sql_keywords_for_model_name` — schema_push a model named `Group` (reserved keyword) with a String field, asserts green + column type, then changes field to Int and reasserts [connectors: all] - [ ] `migrations::sql::can_handle_reserved_sql_keywords_for_field_name` — schema_push a model with a field named `Group` (reserved keyword), asserts green + column type, then changes field to Int and reasserts [connectors: all] - [ ] `migrations::sql::creating_tables_without_primary_key_must_work` — schema_push a `Pair` model with no @id but a @@unique composite index, asserts table has no pk and a unique index on the columns [connectors: all] - [ ] `migrations::sql::relations_to_models_without_a_primary_key_work` — schema_push Pair (no pk, composite @@unique) plus PairMetadata relation, asserts Pair has no pk and PairMetadata's fk references Pair's unique columns [connectors: exclude:vitess] - [ ] `migrations::sql::relations_to_models_with_no_pk_and_a_single_unique_required_field_work` — schema_push Pair (no pk, single @unique field) plus PairMetadata relation, asserts fk references the unique field [connectors: exclude:vitess] - [ ] `migrations::sql::reserved_sql_keywords_must_work` — schema_push a self-referencing `Group` model (reserved keyword) with NoAction fk, asserts fk on parent_id references Group.id [connectors: exclude:vitess] - [ ] `migrations::sql::enum_value_with_database_names_must_work` — schema_push enum CatMood with a @map'd value, asserts enum values (or string column on sqlite), then force schema_push a renamed map value, asserts a warning and updated enum values [connectors: caps:enums] - [ ] `migrations::sql::enum_defaults_must_work` — schema_push Cat model with two enum-default fields, inserts a row, and asserts the raw stored values match the @map'd/db-native enum representations [connectors: caps:enums] - [ ] `migrations::sql::id_as_part_of_relation_must_work` — schema_push Cat/Dog where Cat's @id field doubles as its fk to Dog, asserts pk and fk both target nemesis_id [connectors: exclude:vitess] - [ ] `migrations::sql::multi_field_id_as_part_of_relation_must_work` — schema_push composite @@id fields that are also the composite fk fields, asserts pk and fk both cover the same columns [connectors: exclude:vitess] - [ ] `migrations::sql::remapped_multi_field_id_as_part_of_relation_must_work` — same composite id/fk overlap but fields use @map, asserts pk/fk use the mapped column names [connectors: exclude:vitess] - [ ] `migrations::sql::unique_constraints_on_composite_relation_fields` — schema_push Parent/Child with composite fk fields also covered by @@unique, asserts a unique index on Parent's fk columns [connectors: all] - [ ] `migrations::sql::indexes_on_composite_relation_fields` — schema_push User/SpamList with composite fk fields covered by @@index, asserts a non-unique index on the fk columns [connectors: all] - [ ] `migrations::sql::dropping_mutually_referencing_tables_works` — schema_push three mutually fk-referencing models (A/B/C), asserts 3 tables created, then schema_push an empty schema and asserts all tables dropped [connectors: exclude:vitess] ### schema-engine/sql-migration-tests/tests/migrations/sql/vitess.rs - [ ] `migrations::sql::vitess::dropping_mutually_referencing_tables_works` — Vitess variant of the mutually-referencing-tables test (fks without NoAction), asserts 3 tables created then dropped to 0 after schema_push of an empty schema [connectors: tags:vitess] ### schema-engine/sql-migration-tests/tests/migrations/sqlite.rs - [ ] `migrations::sqlite::sqlite_must_recreate_indexes` — schema_push a model with a @unique column, then adds another column, asserts the unique index on the field survives SQLite's table-recreate migration [connectors: tags:sqlite] - [ ] `migrations::sqlite::sqlite_must_recreate_multi_field_indexes` — same as above with a composite @@unique across two fields, asserts the composite unique index survives table recreation [connectors: tags:sqlite] - [ ] `migrations::sqlite::creating_a_model_with_a_non_autoincrement_id_column_is_idempotent` — schema_push a model with a plain Int @id (INTEGER PRIMARY KEY semantics), re-push asserts green with no steps [connectors: tags:sqlite] - [ ] `migrations::sqlite::treat_nullable_integer_primary_key_as_required` — raw_cmd creates a table with a nullable INTEGER PRIMARY KEY, schema_push a matching autoincrement id model, asserts green with no steps (nullable pk treated as required) [connectors: tags:sqlite] - [ ] `migrations::sqlite::bigint_defaults_work` — expect_sql_for_schema asserts CREATE TABLE SQL for a BigInt @default(0) column on SQLite, then schema_push twice asserts idempotency [connectors: tags:sqlite] - [ ] `migrations::sqlite::default_string_with_escaped_unicode` — expect_sql_for_schema asserts CREATE TABLE SQL renders an escaped-unicode string default as the decoded literal, then schema_push twice asserts idempotency [connectors: tags:sqlite] - [ ] `migrations::sqlite::unique_constraint_errors_in_migrations` — schema_push a Fruit model, inserts duplicate name rows, then force schema_push adding @unique on name, asserts the user-facing error contains SQLite's UNIQUE constraint failure message [connectors: tags:sqlite] - [ ] `migrations::sqlite::introspecting_a_non_existing_db_fails` — gated internally to Sqlite via test_setup::only!, calls the introspect() JSON-RPC op against a nonexistent sqlite file path, asserts the error message reports the database does not exist [connectors: n/a (plain #[test])] ### schema-engine/sql-migration-tests/tests/migrations/squashing_tests.rs - [ ] `migrations::squashing_tests::squashing_whole_migration_history_works` — squash: replacing all applied migration files with one combined "0000_initial" migration.sql is detected as drift/diverged history, then marking it applied leaves the directory ahead with the diagnose/apply flow reconciling to no further applied migrations [connectors: all] - [ ] `migrations::squashing_tests::squashing_migrations_history_at_the_start_works` — squash: replacing only the first two of three applied migrations with a squashed "0000_initial" migration keeps schema unchanged, and diagnose/apply reconciles the directory as 2 migrations behind with nothing left to apply [connectors: all] - [ ] `migrations::squashing_tests::squashing_migrations_history_at_the_end_works` — squash: replacing only the last two of three applied migrations with a squashed "0000_initial" migration keeps schema unchanged, and diagnose/apply reconciles the directory as 2 migrations behind with nothing left to apply [connectors: all] ### schema-engine/sql-migration-tests/tests/migrations/timeouts.rs - [ ] `migrations::timeouts::migrations_can_last_more_than_a_minute_and_succeed` — applies a migration containing pg_sleep(65) followed by a table-creating migration, asserts both apply successfully despite exceeding a one-minute runtime (no premature timeout) [connectors: tags:postgres; ignored] ### schema-engine/sql-migration-tests/tests/migrations/types.rs - [ ] `migrations::types::bytes_columns_are_idempotent` — schema_push a Bytes column, asserts green with steps then idempotent re-push [connectors: all] - [ ] `migrations::types::float_columns_are_idempotent` — schema_push a Float column, asserts green with steps then idempotent re-push [connectors: all] - [ ] `migrations::types::decimal_columns_are_idempotent` — schema_push a Decimal column, asserts green with steps then idempotent re-push [connectors: all] - [ ] `migrations::types::float_to_decimal_works` — schema_push changing a column from Float to Decimal, asserts type family transitions [connectors: all] - [ ] `migrations::types::decimal_to_float_works` — schema_push changing a column from Decimal to Float, asserts type family transitions [connectors: all] - [ ] `migrations::types::bytes_to_string_works` — schema_push changing a column from Bytes to String, asserts column type becomes string [connectors: all] - [ ] `migrations::types::string_to_bytes_works` — schema_push changing a column from Bytes to String (duplicate scenario), asserts column type becomes string [connectors: all] - [ ] `migrations::types::decimal_to_decimal_array_works` — schema_push toggling a Decimal column to Decimal[] and back, asserts required vs list assertions [connectors: caps:scalarlists] - [ ] `migrations::types::bytes_to_bytes_array_works` — schema_push toggling a Bytes column to Bytes[] and back, asserts required vs list assertions [connectors: caps:scalarlists] - [ ] `migrations::types::a_table_recreation_with_noncastable_columns_should_trigger_warnings` — schema_push removing autoincrement and changing type with existing data, asserts MSSQL cast warning [connectors: tags:mssql] - [ ] `migrations::types::a_column_recreation_with_non_castable_type_change_should_trigger_warnings` — schema_push changing Float to DateTime with existing required-column data, asserts unexecutable no-cast-exists error [connectors: tags:postgres] ### schema-engine/sql-migration-tests/tests/migrations/unique.rs - [ ] `migrations::unique::adding_a_new_unique_field_must_work` — schema_push model with @unique field; asserts unique index on field [connectors: all] - [ ] `migrations::unique::adding_new_fields_with_multi_column_unique_must_work` — schema_push model with @@unique compound; asserts unique index on both columns [connectors: all] - [ ] `migrations::unique::unique_in_conjunction_with_custom_column_name_must_work` — schema_push @unique field with @map custom column name; asserts unique index on mapped column name [connectors: all] - [ ] `migrations::unique::multi_column_unique_in_conjunction_with_custom_column_name_must_work` — schema_push @@unique with @map on both columns; asserts unique index on mapped column names [connectors: all] - [ ] `migrations::unique::removing_an_existing_unique_field_must_work` — schema_push @unique field then remove field entirely; asserts no indexes and single remaining id column [connectors: all] - [ ] `migrations::unique::adding_unique_to_an_existing_field_must_work` — schema_push plain field then add @unique (forced); asserts warning about duplicate values and unique index created [connectors: all] - [ ] `migrations::unique::removing_unique_from_an_existing_field_must_work` — schema_push @unique field then remove @unique; asserts no indexes remain [connectors: all] - [ ] `migrations::unique::unique_is_allowed_on_an_id_field` — schema_push field with both @id and @unique; asserts unique index on id field [connectors: all] ### schema-engine/sql-migration-tests/tests/migrations/unique/mssql.rs - [ ] `migrations::unique::mssql::clustered_unique` — schema_push @unique(clustered: true); asserts index clustered and idempotent re-push has no steps [connectors: tags:mssql] - [ ] `migrations::unique::mssql::non_clustered_unique` — schema_push @unique(clustered: false); asserts index non-clustered and idempotent re-push has no steps [connectors: tags:mssql] - [ ] `migrations::unique::mssql::default_clustered_unique` — schema_push plain @unique with no clustered option; asserts default index is non-clustered and idempotent [connectors: tags:mssql] - [ ] `migrations::unique::mssql::non_clustered_to_clustered_unique` — raw_cmd creates nonclustered unique constraint then schema_push @unique(clustered: true) forced; asserts executed steps and index becomes clustered [connectors: tags:mssql] - [ ] `migrations::unique::mssql::clustered_to_non_clustered_unique` — raw_cmd creates clustered unique constraint then schema_push @unique(clustered: false) forced; asserts executed steps and index becomes non-clustered [connectors: tags:mssql] - [ ] `migrations::unique::mssql::brownfield_unique_index_can_be_dropped` — raw_cmd creates unique index on brownfield table then schema_push model without index; asserts unique index dropped [connectors: tags:mssql] - [ ] `migrations::unique::mssql::creating_and_dropping_unique_constraint_works` — schema_push model without unique, then add @@unique (forced), then remove; asserts index created then dropped [connectors: tags:mssql] - [ ] `migrations::unique::mssql::dropping_unique_constraint_works` — schema_push model with @@unique (forced) then remove unique; asserts index dropped [connectors: tags:mssql] ### schema-engine/sql-migration-tests/tests/migrations/unsupported_types.rs - [ ] `migrations::unsupported_types::adding_an_unsupported_type_must_work` — unsupported-type migration: adding `Unsupported("cidr")` columns (including as relation scalar fields) pushes green and the schema reflects the Unsupported column type family [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::unsupported_types::switching_an_unsupported_type_to_supported_must_work` — unsupported-type migration: changing `Unsupported("interval")` columns to `String` pushes green and the schema reflects the new String column type [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::unsupported_types::adding_and_removing_properties_on_unsupported_should_work` — unsupported-type migration: adding dbgenerated defaults to Unsupported columns, then making one nullable+unique (with force, warning about duplicates), then re-adding a dbgenerated default, all push correctly and reflect in the schema [connectors: tags:postgres; exclude:cockroachdb] - [ ] `migrations::unsupported_types::using_unsupported_and_ignore_should_work` — unsupported-type migration: a model with an Unsupported field type marked `@@ignore` pushes green across all connectors' per-connector unsupported type strings [connectors: all] ### schema-engine/sql-migration-tests/tests/migrations/views.rs - [ ] `migrations::views::nothing_gets_written_in_migrations` — expect_sql_for_schema on a schema containing only a `view` declaration (views preview feature), asserts the generated migration is empty [connectors: preview:views] ### schema-engine/sql-migration-tests/tests/native_types/cockroachdb.rs - [ ] `native_types::cockroachdb::typescript_starter_schema_is_idempotent_without_native_type_annotations` — schema_push of CockroachDb typescript-starter Post/User models (BigInt ids) without native types, asserts idempotency across repeated pushes [connectors: tags:cockroachdb] ### schema-engine/sql-migration-tests/tests/native_types/common.rs - [ ] `native_types::common::typescript_starter_schema_is_idempotent_without_native_type_annotations` — schema_push of typescript-starter Post/User models without native types, asserts first push executes steps then repeated pushes are no-steps (idempotent) [connectors: all; exclude:cockroachdb] - [ ] `native_types::common::bigint_primary_keys_are_idempotent` — schema_push of BigInt @id @default(autoincrement()) with and without explicit @db.BigInt native type annotation, asserts green + no-steps idempotency for both variants [connectors: tags:postgres,mysql,mssql; exclude:cockroachdb] ### schema-engine/sql-migration-tests/tests/native_types/mssql.rs - [ ] `native_types::mssql::safe_casts_with_existing_data_should_work` — iterates SAFE_CASTS table, migrates seeded column across each safe native-type cast pair, asserts green push and correct full_data_type before/after [connectors: tags:mssql] - [ ] `native_types::mssql::risky_casts_with_existing_data_should_warn` — iterates RISKY_CASTS table, migrates seeded column across risky cast pairs, asserts push succeeds with the expected data-cast warning [connectors: tags:mssql] - [ ] `native_types::mssql::not_castable_with_existing_data_should_warn` — iterates NOT_CASTABLE table, migrates seeded column across non-castable pairs, asserts push is unexecutable with "column would be dropped and recreated" warning [connectors: tags:mssql] - [ ] `native_types::mssql::typescript_starter_schema_with_native_types_is_idempotent` — pushes typescript-starter schema without native types then with matching @db native type annotations (Int/NVarChar(1000)/Bit), asserts subsequent pushes produce no steps [connectors: tags:mssql] - [ ] `native_types::mssql::typescript_starter_schema_with_different_native_types_is_idempotent` — same starter schema re-pushed with differing native type sizes (NVarChar(MAX)/NVarChar(100)), asserts executed steps on the change then no-steps on repeat [connectors: tags:mssql] ### schema-engine/sql-migration-tests/tests/native_types/mysql.rs - [ ] `native_types::mysql::safe_casts_with_existing_data_should_work` — iterates SAFE_CASTS table (filtered for MariaDB/MySQL 5.6 unsupported types), migrates seeded columns to each safe target native type, asserts green push and correct resulting native type [connectors: tags:mysql] - [ ] `native_types::mysql::risky_casts_with_existing_data_should_warn` — iterates RISKY_CASTS table, force-migrates seeded columns across risky casts, asserts executable push with expected per-column data-cast warning and resulting native type [connectors: tags:mysql] - [ ] `native_types::mysql::impossible_casts_with_existing_data_should_warn` — iterates IMPOSSIBLE_CASTS table, force-migrates seeded nullable columns across impossible casts, asserts executable push with "dropped and recreated" data-loss warning and resulting native type [connectors: tags:mysql] - [ ] `native_types::mysql::typescript_starter_schema_with_native_types_is_idempotent` — pushes typescript-starter schema without native types then with matching @db annotations (Int/VarChar(191)/TinyInt), asserts second/third pushes produce no steps [connectors: tags:mysql] - [ ] `native_types::mysql::typescript_starter_schema_with_different_native_types_is_idempotent` — same starter schema re-pushed with differing native type sizes (VarChar(100)), asserts executed steps on the change then no-steps on repeat [connectors: tags:mysql] - [ ] `native_types::mysql::time_zero_is_idempotent` — schema_push of a model with DateTime @db.Time(0) column, asserts green then no-steps on repeat push [connectors: tags:mysql] - [ ] `native_types::mysql::time_is_idempotent` — schema_push of a model with DateTime @db.Time (no precision) column, asserts green then no-steps on repeat push [connectors: tags:mysql] ### schema-engine/sql-migration-tests/tests/native_types/postgres.rs - [ ] `native_types::postgres::safe_casts_with_existing_data_should_work` — iterates SAFE_CASTS table, migrates seeded column across safe native-type cast pairs, asserts green push and correct native type via assert_native_type before/after [connectors: tags:postgres; exclude:cockroachdb] - [ ] `native_types::postgres::risky_casts_with_existing_data_should_warn` — iterates RISKY_CASTS table, force-migrates seeded column across risky casts, asserts expected per-column data-cast warning and correct resulting native type [connectors: tags:postgres; exclude:cockroachdb] - [ ] `native_types::postgres::not_castable_with_existing_data_should_warn` — iterates NOT_CASTABLE table, migrates seeded column across non-castable pairs, asserts "dropped and recreated" data-loss warning while type remains unchanged [connectors: tags:postgres; exclude:cockroachdb] - [ ] `native_types::postgres::safe_casts_from_array_with_existing_data_should_work` — iterates SAFE_CASTS_NON_LIST_TO_STRING table, migrates seeded array-typed column down to scalar string types (Text/VarChar), asserts green push and correct resulting native type [connectors: tags:postgres; exclude:cockroachdb] - [ ] `native_types::postgres::typescript_starter_schema_with_native_types_is_idempotent` — pushes typescript-starter Post/User schema without native types then with matching @db.Integer/@db.Text/@db.Boolean annotations, asserts no-steps on repeat and on the native-type variant [connectors: tags:postgres; exclude:cockroachdb] - [ ] `native_types::postgres::typescript_starter_schema_with_different_native_types_is_idempotent` — same starter schema re-pushed with VarChar(100) native types instead of defaults, asserts executed steps on the type change then no-steps on repeat [connectors: tags:postgres; exclude:cockroachdb] ### schema-engine/sql-migration-tests/tests/query_introspection/docs.rs - [ ] `query_introspection::docs::parses_doc_complex_pg` — introspectSql with @description/@param doc comments (named + positional) on Postgres; asserts parsed query documentation and per-param docs/types/nullability [connectors: tags:postgres] - [ ] `query_introspection::docs::parses_doc_complex_mysql` — introspectSql with same doc-comment parsing on MySQL; asserts parsed documentation/params, then executes query_raw with the parsed positional values [connectors: tags:mysql] - [ ] `query_introspection::docs::parses_doc_no_position` — introspectSql with only named :myInt param documented, second placeholder undocumented; asserts named param type/doc and fallback "unknown" typing for undocumented ? [connectors: tags:sqlite] - [ ] `query_introspection::docs::parses_doc_no_alias` — introspectSql with only second numbered param documented ($2); asserts first param falls back to inferred int4 name/type, second gets doc [connectors: tags:postgres] - [ ] `query_introspection::docs::parses_doc_enum_name` — introspectSql with @param {MyFancyEnum} $1 against enum schema; asserts param typed as custom enum name [connectors: tags:postgres] - [ ] `query_introspection::docs::invalid_position_fails` — introspectSql with malformed @param position "$hello"; asserts doc-parsing error message about invalid position [connectors: tags:postgres] - [ ] `query_introspection::docs::unknown_type_fails` — introspectSql with unknown @param type {Hello}; asserts doc-parsing error listing accepted types [connectors: tags:postgres] - [ ] `query_introspection::docs::duplicate_param_position_fails` — introspectSql with two @param entries reusing position $1; asserts duplicate-parameter doc-parsing error [connectors: tags:postgres] - [ ] `query_introspection::docs::duplicate_param_name_fails` — introspectSql with two @param entries reusing alias myInt; asserts duplicate-parameter doc-parsing error [connectors: tags:postgres] - [ ] `query_introspection::docs::missing_param_position_or_alias_fails` — introspectSql with @param missing position/alias (just name); asserts missing-position-or-alias doc-parsing error [connectors: tags:postgres] - [ ] `query_introspection::docs::missing_everything_fails` — introspectSql with bare @param and no metadata; asserts "could not parse any information" doc-parsing error [connectors: tags:postgres] ### schema-engine/sql-migration-tests/tests/query_introspection/mysql.rs - [ ] `query_introspection::mysql::insert_mysql` — introspectSql INSERT with all placeholder params; asserts param types (bigint/string/bigint/double/bytes/bigint/datetime), all non-null, no result columns [connectors: tags:mysql8; exclude:vitess] - [ ] `query_introspection::mysql::select_mysql` — introspectSql SELECT all columns; asserts result column types incl. bool mapped to int, all non-null [connectors: tags:mysql,mariadb] - [ ] `query_introspection::mysql::select_nullable_mysql` — introspectSql SELECT all columns against nullable schema; asserts result columns (except id) nullable, bool mapped to int [connectors: tags:mysql,mariadb] - [ ] `query_introspection::mysql::empty_result` — introspectSql SELECT `int` FROM model WHERE 1=0 AND `int`=?; asserts param typed bigint and result column typed int, non-null [connectors: tags:mysql8; exclude:vitess] - [ ] `query_introspection::mysql::unnamed_expr` — introspectSql SELECT 1+1; asserts unnamed-expr column named "1 + 1" typed bigint, non-null [connectors: tags:mysql8] - [ ] `query_introspection::mysql::named_expr` — introspectSql SELECT 1+1 as "add"; asserts named column typed bigint, non-null [connectors: tags:mysql8] - [ ] `query_introspection::mysql::mixed_named_expr` — introspectSql SELECT `int`+1 as "add" FROM `model`; asserts named column typed bigint, non-null [connectors: tags:mysql8] - [ ] `query_introspection::mysql::mixed_unnamed_expr` — introspectSql SELECT `int`+1 FROM `model` without alias; asserts unnamed column keyed by raw expr text typed bigint, non-null [connectors: tags:mysql8] - [ ] `query_introspection::mysql::mixed_expr_cast` — introspectSql SELECT CAST(`int`+1 AS CHAR) as test FROM `model`; asserts cast column typed string, nullable [connectors: tags:mysql8] - [ ] `query_introspection::mysql::mysql8::test_scalar_types` — macro-generated (8 cases: int..decimal); schema_push each Prisma scalar type then introspectSql INSERT/SELECT; asserts param ColumnType Int64 and mapped output type per scalar [connectors: tags:mysql8; exclude:vitess] - [ ] `query_introspection::mysql::mysql8::test_native_types` — macro-generated (32 cases: int..json); schema_push each MySQL8 native type then introspectSql INSERT/SELECT; asserts parsed param and output ColumnType per variant [connectors: tags:mysql8; exclude:vitess] - [ ] `query_introspection::mysql::mysql57::test_scalar_types` — macro-generated (8 cases: int..decimal) against MySQL 5.7; asserts param type Unknown (no binary protocol typing) and mapped output type per scalar [connectors: tags:mysql57; exclude:vitess] - [ ] `query_introspection::mysql::mysql57::test_native_types` — macro-generated (32 cases: int..json) against MySQL 5.7; asserts param type Unknown and output ColumnType per variant [connectors: tags:mysql57; exclude:vitess] - [ ] `query_introspection::mysql::mysql56::test_scalar_types` — macro-generated (8 cases: int..decimal) against MySQL 5.6; asserts param type Unknown and mapped output type per scalar [connectors: tags:mysql56; exclude:vitess] - [ ] `query_introspection::mysql::mysql56::test_native_types` — macro-generated (31 cases: int..year, no json) against MySQL 5.6; asserts param type Unknown and output ColumnType per variant [connectors: tags:mysql56; exclude:vitess] - [ ] `query_introspection::mysql::mariadb::test_scalar_types` — macro-generated (8 cases: int..decimal) against MariaDB; asserts param type Unknown and mapped output type per scalar [connectors: tags:mariadb; exclude:vitess] - [ ] `query_introspection::mysql::mariadb::test_native_types` — macro-generated (32 cases: int..json, json maps to text) against MariaDB; asserts param type Unknown and output ColumnType per variant [connectors: tags:mariadb; exclude:vitess] ### schema-engine/sql-migration-tests/tests/query_introspection/pg.rs - [ ] `query_introspection::pg::common::insert` — introspectSql on INSERT...RETURNING all columns; asserts every parsed param and result column type/nullable (int/text/int8/float8/bytea/bool/timestamp), all non-nullable [connectors: tags:postgres] - [ ] `query_introspection::pg::common::insert_nullable` — introspectSql same INSERT against nullable schema; asserts params non-null but returned columns (except id) nullable [connectors: tags:postgres] - [ ] `query_introspection::pg::common::empty_result` — introspectSql SELECT int FROM model WHERE 1=0 AND int=?; asserts parsed param/result column type+nullability despite empty result set [connectors: tags:postgres] - [ ] `query_introspection::pg::common::custom_enum` — introspectSql INSERT...RETURNING id, enum; asserts enum param/column typed as custom enum name MyFancyEnum [connectors: tags:postgres,cockroachdb] - [ ] `query_introspection::pg::postgres::named_expr` — introspectSql SELECT 1+1 as "add"; asserts named-expr result column typed int, nullable [connectors: tags:postgres; exclude:cockroachdb] - [ ] `query_introspection::pg::postgres::mixed_named_expr` — introspectSql SELECT "int"+1 as "add" FROM "model"; asserts named-expr column typed int, nullable [connectors: tags:postgres; exclude:cockroachdb] - [ ] `query_introspection::pg::postgres::mixed_unnamed_expr` — introspectSql SELECT "int"+1 FROM "model" without alias; asserts error requiring explicit column alias [connectors: tags:postgres; exclude:cockroachdb] - [ ] `query_introspection::pg::postgres::mixed_expr_cast` — introspectSql SELECT CAST("int"+1 as int) FROM model; asserts cast column named int4, typed int, nullable [connectors: tags:postgres; exclude:cockroachdb] - [ ] `query_introspection::pg::postgres::subquery` — introspectSql SELECT int, foo.int, foo.string FROM (SELECT * FROM model) AS foo; asserts subquery column nullability preserved from source [connectors: tags:postgres; exclude:cockroachdb] - [ ] `query_introspection::pg::postgres::left_join` — introspectSql SELECT parent/child LEFT JOIN; asserts left-joined side (child) columns become nullable, parent stays as-is [connectors: tags:postgres; exclude:cockroachdb] - [ ] `query_introspection::pg::postgres::outer_join` — introspectSql across 5 named queries (inner/left/right/full join, tweet table); asserts nullability inference per join type incl. inversion on right join, both-nullable on full join [connectors: tags:postgres; exclude:cockroachdb] - [ ] `query_introspection::pg::postgres::test_native_types_pg` — macro-generated (26 cases: small_int..json_b); schema_push each Postgres native type then introspectSql INSERT...RETURNING field; asserts parsed param/column ColumnType matches expected mapping [connectors: tags:postgres; exclude:cockroachdb] - [ ] `query_introspection::pg::crdb::named_expr` — introspectSql SELECT 1+1 as "add" on CockroachDB; asserts column typed bigint, nullable [connectors: tags:cockroachdb] - [ ] `query_introspection::pg::crdb::mixed_named_expr` — introspectSql SELECT "int"+1 as "add" FROM "model"; asserts column typed bigint, nullable [connectors: tags:cockroachdb] - [ ] `query_introspection::pg::crdb::mixed_unnamed_expr` — introspectSql SELECT "int"+1 FROM "model" without alias; asserts error requiring explicit column alias [connectors: tags:cockroachdb] - [ ] `query_introspection::pg::crdb::mixed_expr_cast` — introspectSql SELECT CAST("int"+1 as int) FROM model; asserts cast column typed int8/bigint, nullable [connectors: tags:cockroachdb] - [ ] `query_introspection::pg::crdb::subquery` — introspectSql subquery SELECT int, foo.int, foo.string FROM (SELECT * FROM model) AS foo; asserts nullability matches source columns [connectors: tags:cockroachdb] - [ ] `query_introspection::pg::crdb::left_join` — introspectSql parent/child LEFT JOIN; asserts parentid stays non-nullable (differs from pg) while child columns nullable [connectors: tags:cockroachdb] - [ ] `query_introspection::pg::crdb::outer_join` — introspectSql across 5 named queries (inner/left/right/full join, tweet table) on CockroachDB; asserts crdb keeps columns non-nullable even on right/full joins, unlike pg [connectors: tags:cockroachdb] - [ ] `query_introspection::pg::crdb::test_native_types_crdb` — macro-generated (22 cases: bit..var_bit); schema_push each CockroachDB native type then introspectSql INSERT...RETURNING field; asserts parsed param/column ColumnType matches expected mapping [connectors: tags:cockroachdb] ### schema-engine/sql-migration-tests/tests/query_introspection/sqlite.rs - [ ] `query_introspection::sqlite::insert_sqlite` — introspectSql INSERT with all placeholder params; asserts every param typed "unknown" non-null and no result columns [connectors: tags:sqlite] - [ ] `query_introspection::sqlite::select_sqlite` — introspectSql SELECT all columns; asserts result column types/nullability match SIMPLE_SCHEMA, all non-null [connectors: tags:sqlite] - [ ] `query_introspection::sqlite::select_nullable_sqlite` — introspectSql SELECT all columns against nullable schema; asserts result columns (except id) nullable [connectors: tags:sqlite] - [ ] `query_introspection::sqlite::empty_result` — introspectSql SELECT int FROM model WHERE 1=0 AND int=?; asserts param typed unknown and result column typed int, non-null [connectors: tags:sqlite] - [ ] `query_introspection::sqlite::unnamed_expr_int` — introspectSql SELECT 1+1; asserts unnamed-expr column named "1 + 1" typed bigint, non-null; also verifies runtime query_raw value [connectors: tags:sqlite] - [ ] `query_introspection::sqlite::named_expr_int` — introspectSql SELECT 1+1 as "add"; asserts named column typed bigint, non-null; verifies runtime value [connectors: tags:sqlite] - [ ] `query_introspection::sqlite::named_expr_int_optional` — introspectSql SELECT 1+1 as `add?`; asserts column name "add?" typed bigint, nullable due to `?` suffix convention [connectors: tags:sqlite] - [ ] `query_introspection::sqlite::mixed_named_expr_int` — introspectSql SELECT `int`+1 as "add" FROM `model`; asserts named column typed bigint, non-null [connectors: tags:sqlite] - [ ] `query_introspection::sqlite::mixed_unnamed_expr_int` — introspectSql SELECT `int`+1 FROM `model` without alias; asserts unnamed column keyed by raw expr text typed bigint, non-null [connectors: tags:sqlite] - [ ] `query_introspection::sqlite::mixed_expr_cast_int` — introspectSql SELECT CAST(`int`+1 as int) FROM `model`; asserts cast column keyed by expr text typed bigint, non-null [connectors: tags:sqlite] - [ ] `query_introspection::sqlite::unnamed_expr_string` — introspectSql SELECT 'hello world'; asserts string-literal column typed string, non-null; verifies runtime text value [connectors: tags:sqlite] - [ ] `query_introspection::sqlite::unnamed_expr_bool` — introspectSql SELECT 1=1, 1=0; asserts both boolean-expr columns typed bigint, non-null; verifies runtime int values [connectors: tags:sqlite] - [ ] `query_introspection::sqlite::unnamed_expr_real` — introspectSql SELECT 1.2, 2.34567891023, round(2.345); asserts literal/real columns typed double, round() nullable; verifies runtime float values [connectors: tags:sqlite] - [ ] `query_introspection::sqlite::unnamed_expr_blob` — introspectSql SELECT unhex('537475666673'); asserts blob-producing column typed bytes, nullable; verifies runtime bytes value [connectors: tags:sqlite] - [ ] `query_introspection::sqlite::unnamed_expr_date` — introspectSql SELECT date('2025-05-29 14:16:00'); asserts date() column typed string, nullable; verifies runtime text value [connectors: tags:sqlite] - [ ] `query_introspection::sqlite::unnamed_expr_time` — introspectSql SELECT time('2025-05-29 14:16:00'); asserts time() column typed string, nullable; verifies runtime text value [connectors: tags:sqlite] - [ ] `query_introspection::sqlite::unnamed_expr_datetime` — introspectSql SELECT datetime('2025-05-29 14:16:00'); asserts datetime() column typed string, nullable; verifies runtime text value [connectors: tags:sqlite] - [ ] `query_introspection::sqlite::subquery` — introspectSql SELECT `int` FROM (SELECT * FROM `model`); asserts subquery column typed int, non-null [connectors: tags:sqlite] - [ ] `query_introspection::sqlite::left_join` — introspectSql SELECT parent/child LEFT JOIN; asserts both parentId and childId columns typed int, non-null (sqlite doesn't infer join nullability) [connectors: tags:sqlite] ### schema-engine/sql-migration-tests/tests/schema_push/mod.rs - [ ] `schema_push::schema_push_happy_path` — schema_push twice on evolving Cat/Box schema; asserts green migrations, executed steps, and resulting column/type changes across both pushes [connectors: all] - [ ] `schema_push::schema_push_warns_about_destructive_changes` — schema_push dropping a non-empty Box table; asserts destructive-change warning blocks the push until forced, then succeeds with force(true) [connectors: all] - [ ] `schema_push::schema_push_with_an_unexecutable_migration_returns_a_message_and_aborts` — schema_push adding a required column without a default to a non-empty table; asserts unexecutable-step message and no steps applied [connectors: all] - [ ] `schema_push::indexes_and_unique_constraints_on_the_same_field_do_not_collide` — schema_push a model with both @unique and @@index on the same field; asserts green push with no naming collision [connectors: all] - [ ] `schema_push::multi_column_indexes_and_unique_constraints_on_the_same_fields_do_not_collide` — schema_push a model with matching multi-column @@index and @@unique; asserts green push with no naming collision [connectors: all] - [ ] `schema_push::alter_constraint_name_push` — schema_push then re-push with custom map: names for pk/unique/index/fk; asserts renamed constraints reflected in the resulting schema across supported connectors [connectors: exclude:vitess] - [ ] `schema_push::alter_constraint_name_and_alter_columns_at_same_time_push` — schema_push adding a column while simultaneously renaming the primary key constraint; asserts both changes applied together (custom pk name + new column) [connectors: exclude:sqlite,mysql] - [ ] `schema_push::sqlite_reserved_name_space_can_be_used` — schema_push using "sqlite_"-prefixed map: names for unique/index constraints; asserts green push and index names preserved despite SQLite's reserved prefix [connectors: tags:sqlite] - [ ] `schema_push::duplicate_index_names_across_models_work_on_mssql` — schema_push two models each with an index/default named "Duplicate"; asserts MSSQL allows duplicate constraint names across tables [connectors: tags:mssql] - [ ] `schema_push::duplicate_constraint_names_across_namespaces_work_on_mssql` — schema_push models reusing the constraint name "MyName"/"MyOtherName" across default/index/fk; asserts green push on MSSQL [connectors: tags:mssql] - [ ] `schema_push::duplicate_primary_and_index_name_in_different_table_works_on_mssql` — schema_push models where a pk map: name matches an index map: name in another table; asserts green push on MSSQL [connectors: tags:mssql] - [ ] `schema_push::duplicate_primary_and_foreign_key_name_across_models_work_on_postgres` — schema_push models reusing map: "foo" for both a pk and an fk across tables; asserts green push on Postgres [connectors: tags:postgres] - [ ] `schema_push::duplicate_constraint_names_across_models_work_on_mysql` — schema_push two models each indexing with name "MyName"; asserts green push on MySQL [connectors: tags:mysql] - [ ] `schema_push::implicit_relations_indices_are_not_renamed_unnecessarily` — create_migration twice unchanged on models with long implicit relation names; asserts second migration is a no-op (no unnecessary index rename) [connectors: tags:postgres] - [ ] `schema_push::creating_index_on_long_varchar_without_length_fails` — schema_push id String @db.VarChar(2000) indexed/unique/pk without a length; asserts the push fails on MySQL [connectors: tags:mysql] - [ ] `schema_push::mysql_should_diff_column_ordering_correctly_issue_10983` — raw_cmd creates a table then schema_push an identical model; asserts green push with no steps despite column/index ordering (regression for issue 10983) [connectors: tags:mysql] - [ ] `schema_push::issue_repro_extended_indexes` — schema_push a model with overlapping @@unique/@@index on a shared plus extra column, twice; asserts executable then idempotent no-op push (regression for issue 11631) [connectors: all] - [ ] `schema_push::schema_push_with_schema_filters` — schema_push with namespaced_schema_filter excluding "ExternalTable"; asserts the filtered table is absent while the included table is created [connectors: all] - [ ] `schema_push::schema_push_with_invalid_schema_filters` — schema_push with an external_tables filter entry that doesn't match the expected naming convention; asserts a connector-specific error code (P3023/P3024) [connectors: all] ### schema-engine/sql-migration-tests/tests/schema_push/views.rs - [ ] `schema_push::views::views_are_ignored` — schema_push a bare view; asserts the push is a no-op and neither a table nor a view exists in the resulting schema [connectors: preview:views] - [ ] `schema_push::views::relations_from_view_are_ignored` — schema_push a model with an array relation to a view; asserts the push succeeds and the model side has no generated foreign keys [connectors: preview:views] - [ ] `schema_push::views::relations_to_view_are_ignored` — schema_push a model with a singular relation to a view; asserts the push succeeds and the model side has no generated foreign keys [connectors: preview:views] ### schema-engine/sql-migration-tests/tests/single_migration_tests.rs - [ ] `single_migration_tests/mysql/create_constraint_name_tests_w_explicit_names.prisma` — MySQL constraint names explicitly set via `map:` on `@unique`, compound `@@unique`, `@@index`, and relation FK; expects CreateTable with those exact named UNIQUE/INDEX/PRIMARY KEY identifiers [connectors: tags:vitess] - [ ] `single_migration_tests/mysql/create_constraint_name_tests_w_implicit_names.prisma` — MySQL same unique/index/FK shape without explicit `map:` names; expects CreateTable using Prisma's default-generated constraint names (`A_name_key`, `A_a_idx`, `A_a_b_key`, `B_a_b_idx`) [connectors: tags:vitess] - [ ] `single_migration_tests/mysql/enums/enum_fields.prisma` — MySQL enum-typed fields (one nullable with a default, one required with a default); expects CreateTable with inline `ENUM(...)` column types and DEFAULT values [connectors: tags:mysql] - [ ] `single_migration_tests/postgres/empty_dbgenerated.prisma` — Postgres field with an empty `@default(dbgenerated())` call; expects a plain `TEXT NOT NULL` column with no generated-default clause emitted [connectors: tags:postgres; exclude:cockroachdb] - [ ] `single_migration_tests/postgres/empty_unsupported_dbgenerated.prisma` — Postgres nullable `Unsupported("tsvector")` column with an empty `dbgenerated()` default; expects a bare nullable `tsvector` column with no default clause [connectors: tags:postgres; exclude:cockroachdb] - [ ] `single_migration_tests/postgres/enums/enum_basic.prisma` — Postgres basic enum type on a required field; expects a `CreateEnum` for the enum type followed by a table referencing it [connectors: tags:postgres; exclude:cockroachdb] - [ ] `single_migration_tests/postgres/enums/enum_fields.prisma` — Postgres multiple enum-typed fields with defaults (required and nullable-with-default); expects three `CreateEnum` statements and a table with matching DEFAULT enum values [connectors: tags:postgres; exclude:cockroachdb] - [ ] `single_migration_tests/postgres/enums/mapped_basic.prisma` — Postgres enum with `@@map` to a different DB type name; expects `CreateEnum` and the column type to use the mapped name (`avocado_ripeness_status`) rather than the Prisma enum name [connectors: tags:postgres; exclude:cockroachdb] - [ ] `single_migration_tests/postgres/multi_schema_basic.prisma` — Postgres multi-schema setup with models/enum spread across `public`/`security`/`users` plus a cross-schema relation; expects three `CreateSchema` statements, enum created in its schema, tables in their respective schemas, and a cross-schema foreign key [connectors: tags:postgres; exclude:cockroachdb] - [ ] `single_migration_tests/postgres/multi_schema_implicit_many_to_many_join_table_is_in_first_model_schema.prisma` — Postgres implicit many-to-many relation between models declared in two different schemas (`veggies`, `roots`); expects the implicit join table to be created in the first-declared model's schema (`roots`) with cross-schema foreign keys [connectors: tags:postgres; exclude:cockroachdb] - [ ] `single_migration_tests/postgres/multi_schema_unused_namespace.prisma` — Postgres datasource declaring an extra `unused` schema not referenced by any model; expects `CreateSchema` only for the schemas actually used by models/enums, omitting `unused` [connectors: tags:postgres; exclude:cockroachdb] - [ ] `single_migration_tests/postgres/scalar_lists_with_enum_and_int_id.prisma` — Postgres model with a scalar list (`String[]`) and an enum list (`Status[]`) alongside an Int id; expects a `CreateEnum` plus a table with `TEXT[]` and `"Status"[]` array columns [connectors: tags:postgres; exclude:cockroachdb] - [ ] `single_migration_tests/sqlite/constraint_names_basic.prisma` — SQLite explicit `map:` names on `@unique`, compound `@@unique`, and `@@index`; expects a CreateTable plus separate `CreateIndex` statements using the mapped names (SQLite has no inline named unique/index syntax) [connectors: tags:sqlite] **Total: 831 tests**