Skip to content
romagny13 edited this page Jun 9, 2017 · 4 revisions

EasyMig

Migration Tool and Services

Support:

Commands:

  • Drop Database

  • Create Database, Create and use Database

  • Create Table

    • Add primary key
    • Add column (type, nullable, default, unique)
    • Add foreign key
    • add timestamps
    • Insert data
  • Alter Table

    • Add column
    • Modify column
    • Drop column
    • Add primary key constraint
    • Add foreign key constraint
  • Drop Table

  • Create Stored Procedure

  • Drop Stored Procedure

  • SeedTable

    • Insert dictionary of key/value

Execution:

  • Do Migrations All: update database from Assembly path or Types or in Memory
  • Do Migration One (only one migration file/Type)
  • Do Seed All: from Assembly path or Types or in Memory
  • Do Seed One (only one seeder)
  • Get Migrations | Seeders Query string
  • Create Migration Script (create table, etc.)
  • Create Seed Script
  • Create Stored procedure Script for SSMS (with GO DELIMTER)
  • Execute a sql Query

Database information:

  • Check if Database exists
  • Check if Table exists
  • Check if Column exists
  • Check if Stored Procedure exists
  • Get Table Schema with columns, primary key and foreign key definitions
  • Get Table rows

Version: Migration and Seeder types are grouped by name and sorted by version and name. Example: "_001_CREATE_POSTS_TABLE" is before "_002_CREATE_POSTS_TABLE". Only the last is executed ("_002_CREATE_POSTS_TABLE" here)

"_001_CREATE_POSTS_TABLE" : the version is "001", the name is "CREATE_POSTS_TABLE", the full name is "_001_CREATE_POSTS_TABLE"

Installation With NuGet

PM> Install-Package EasyMig
Clone this wiki locally