Skip to content

Error creating full database script after migrations run #497

@jdcrutchley

Description

@jdcrutchley

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions