Skip to content

Error creating full database script after migrations run #10

Description

@roji

From @jdcrutchley on February 20, 2015 21:42

This only occurs if I've already run migrations and specify I want to create a full database creation script like so:

Database-Update -Script -SourceMigration $InitialDatabase

The error generated is:

object reference not set to an instance of an object

If I specify any other source migration besides $IntialDatabase it works properly. Also, if I first revert all the way to zero then ask for script, it runs fine. So this is my current workaround:

Database-Update -TargetMigration $InitialDatabase
Database-Update -Script
Database-Update

So there's a fine workaround, but it would be nice to be able to generate the script without reverting first.

Copied from original issue: npgsql/npgsql#497

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions