Mindscape
  • Register
  • Login
  • YOUR CART IS EMPTY
home
Software
  • Developers Toolbox
  • LightSpeed
  • Raygun
  • WPF Elements
  • Web Workbench
  • Metro Elements
  • Silverlight Elements
  • NHibernate Designer
  • Phone Elements
  • WPF Diagrams
  • Simple DB management
  • Visual Tools for SharePoint
Downloads
Store
  • Buy online
  • Purchase order
  • Volume discounts
  • Reseller
  • Software license
  • Contact sales
Blog
Support
About
  • About Us
  • Contact
  • Testimonials
rss
twitter
facebook
Database Migrations Creating Migrations Running Migrations Creating SQL Scripts from Migrations Database Support

Creating SQL Scripts from Migrations

To create SQL scripts from Visual Studio:

·         Open your model.

·         From the Migrations menu, choose Run Migrations. The Migrations window is displayed.

·         Check that the Method is set to Generate SQL script and that the database is correct. If you want LightSpeed to work out the starting version for the script by connecting to the database, check that the connection string is correct; if you want to specify the starting version for the SQL script yourself, check that the connection string shows Not connected. If you need to change any of these settings, choose the Change button. (See below for more info.)

·         The Migrations window shows the available migrations and the current database version. (If you see a “migrations project does not build” message, open the Errors window and fix the problems, then click Refresh to try again.)

·         If you’re connected to a database, select the target version which you’d like to generate a SQL script for migrating to.

·         If you’re not connected to a database, select the start and end versions for which you’d like to generate a SQL script for migrating between.

·         Select Generate SQL.

LightSpeed generates the SQL script and displays it in Visual Studio. You can save this SQL script to the folder of your choice.

Choosing the Generation Settings

Before you first generate a SQL script, you need to choose the target database type; optionally, you can also choose a database instance from which LightSpeed will work out the current version. To do this:

·         Choose the Change button next to the database connection information.

·         LightSpeed displays the Migration Settings wizard.

·         Choose Generate SQL that I can later apply to a database and click Next.

·         If you’d like LightSpeed to work out the current version automatically each time you generate a script, choose I’m connected to the database from this computer. Otherwise, choose I’m not connected to the database from this computer. Click Next.

·         If you chose connected operation, either select a Server Explorer connection, or choose a database type and enter a connection string.

·         If you chose disconnected operation, choose a database type.

·         Click Finish.

If you subsequently need to change the migration settings, choose the Change button again and re-run the wizard.

Data Products

  • LightSpeed ORM
  • NHibernate Designer
  • SimpleDB Tools
  • SharePoint Tools

DevOp Tools

  • Raygun

Visual Controls

  • WPF Elements
  • WPF Diagrams
  • Silverlight Elements
  • Phone Elements

Popular Products

  • Web Workbench

    Modern web development for Visual Studio!

  • Mindscape Megapack

    All Mindscape products for one awesome price!

Quick Links

  • Forums
  • Blog
  • Register
  • Login
  • Contact us
  • Twitter
  • Facebook
  • Google+
  • YouTube
  • Linkedin
  • Rss

© Mindscape 2025. Mindscape is a registered trademark of Mindscape Limited.

  • Terms
  • Privacy