Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 731865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:04:35+00:00 2026-05-14T07:04:35+00:00

Could I use migrator.net bare migration framework and just have a set of SQL

  • 0

Could I use migrator.net bare migration framework and just have a set of SQL files to do the upgrade/downgrade? i.e. just use the framework to check database version and which scripts to run etc?

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T07:04:36+00:00Added an answer on May 14, 2026 at 7:04 am

    Yes. I have a mixture of sql and code migrations. My migration which uses sql files looks something like:

    using System.Data;
    using Migrator.Framework;
    using System.IO;
    using System.Reflection;
    
    namespace MyDBMigration
    {
        [Migration(2)]
        public class CreateStructures_002 : Migration
        {
    
            public override void Up()
            {
                Assembly asm = Assembly.GetAssembly(typeof(CreateStructures_002));
                Stream s = asm.GetManifestResourceStream("MyDBMigration.SqlScripts.createbaredb.sql");
                StreamReader sr = new StreamReader(s);
                string sql = sr.ReadToEnd();
                Database.ExecuteNonQuery(sql);
            }
    
            public override void Down()
            {
                Assembly asm = Assembly.GetAssembly(typeof(CreateStructures_002));
                Stream s = asm.GetManifestResourceStream("MyDBMigration.SqlScripts.dropbaredb.sql");
                StreamReader sr = new StreamReader(s);
                string sql = sr.ReadToEnd();
                Database.ExecuteNonQuery(sql);
            }
        }
    }
    

    Where I have two files ‘createbaredb.sql’ and ‘dropbaredb.sql’ in a directory (SqlScripts) and set as ‘Embedded Resource’ in the file property pane.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I could use another set of eyes - perhaps I am missing somehting obvious.
I could use some help with expression conversion. I have a method on a
I could use some help writing a SQL query. I'm trying to display some
I could use a little help with an XPath-Expression. check the code below; how
I have flex advancedDataGrid (could use dataGrid if that works better, though i like
I could use some pointers on my query I have three external tables that
I could use two loops to check for all combinations of two integers that
I could use the following: <fileset dir=C:\Program Files\eclipse\plugins\myplugin> <include name=extraStuff.jar /> </fileset> But that
I could use net use command at windows successfully using both Administrator and other
I could use some help with a RIA services query that I have been

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.