Skip to content

Error in migration engine - Unknown field name, expected model #915

Closed

Description

@poulainv

Report id 524

Since I've upgraded to [email protected]
I have an issue when running lift

prisma2 lift save
 ERROR  Oops, an unexpected error occured!
Error in migration engine: [2019-11-10T10:26:36Z INFO  quaint::pool] Starting a PostgreSQL pool with 5
connections.
thread 'tokio-runtime-worker-0' panicked at 'Error parsing the migration steps: Error("unknown field `n
ame`, expected `model`", line: 1, column: 59)', src/libcore/result.rs:1165:5
stack backtrace:
   0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
   1: core::fmt::write
   2: std::io::Write::write_fmt
   3: std::panicking::default_hook::{{closure}}
   4: std::panicking::default_hook
   5: migration_engine::main::{{closure}}
   6: std::panicking::rust_panic_with_hook
   7: std::panicking::continue_panic_fmt
   8: rust_begin_unwind
   9: core::panicking::panic_fmt
  10: core::result::unwrap_failed
  11: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &mut F>::call_once
  12: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter
  13: <sql_migration_connector::sql_migration_persistence::SqlMigrationPersistence as migration_connect
or::migration_persistence::MigrationPersistence>::load_all
  14: <migration_engine::commands::list_migrations::ListMigrationStepsCommand as migration_engine::comm
ands::command::MigrationCommand>::execute

It works perfectly well when I downgrade to [email protected]. Moreover, photon is still working with both versions.

By database connection enabled SSL DATABASE_URL="postgresql://postgres:[email protected]:5432/postgres?sslaccept=accept_invalid_certs"

node --version v10.16.0

Note that I've reproduced it from scratch with prisma2 init after inspecting & creating my schema in new project.

Activity

  1. pantharshit00 commented on Nov 11, 2019

    @pantharshit00
    Contributor

    @poulainv

    Can you please try this with a fresh database? Maybe the structure of _Migrations table has changed since you have upgraded. In the preview period, please expect breaking changes.

    If you are still able to reproduce, please share your datamodel.

  2. added
    bug/0-unknown
    kind/bug
    on Nov 11, 2019
  3. poulainv commented on Nov 11, 2019

    @poulainv
    Author

    @pantharshit00 you are right, it works well after that! 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug/0-unknownkind/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions