Is it possible to force a new migration based on t...
# orm-help
a
Is it possible to force a new migration based on the current schema?
j
Define "migration".
Just getting the db in that state? Then
db push
.
Getting a new migration sql file? Then also certainly yet, but I am not sure of the steps.
a
I have the schema file with integer type but when I ran the migration command it created a bigserial type in the migration file.
So I was wondering if there is a way to fix this by forcing the exact current schema to the DB.
Just tried the
db push
and got this error.
Copy code
Error: Database error
Error querying the database: db error: ERROR: type "serial" does not exist
   0: sql_migration_connector::sql_database_step_applier::apply_migration
             at migration-engine\connectors\sql-migration-connector\src\<http://sql_database_step_applier.rs:11|sql_database_step_applier.rs:11>
   1: migration_core::api::SchemaPush
             at migration-engine\core\src\<http://api.rs:161|api.rs:161>
Why is it creating a type that doesn't exist in schema?
j
I would say that type is just the representation of your Prisma schema.