-
Notifications
You must be signed in to change notification settings - Fork 1
Resharper File Template
For Resharper users a File Template that can be accessed from the quick menu (Alt + Insert) can make life a bit easier. Creating migration classes for hand every time can be repetitive and a template that sets the migration attribute automatically reduces the risk of errors.
A starter File Template for FluentMigrator migrations can be found in the docs folder.
In the template are a couple of macros that set the namespace to the current assembly's namespace, class name to the filename and the migration attribute to the current date in yyyyMMddHHmm format.
-
In Visual Studio click on the Resharper menu and open Templates Explorer and then open the File Templates tab.
-
Click the Import button and choose the Migration.DotSettings file.
-
You should now see the imported Migration template under "Not in quicklist" section.
-
Drag and drop the Migration template up to the "In quicklist" section to make it available in the quicklist.
-
Done! Now you should be able to see Migration as an option in the Alt+Insert menu for Visual Studio's Solution Explorer.
Try it out and adjust the template to suit your own style.
- Getting FluentMigrator
- How to create a Migration
- Fluent Interface
- Migration Runners
- Use inbuilt database functions when setting the default value
- Sql Server Specific Extensions
- Raw Sql Helper for inserting data
- Auto Reversing Migrations
- Resharper File Template
- Transaction Modes for the Migration Runner
- ApplicationContext: Passing parameters to Migrations
- Dealing with Multiple Database Types
- Filter migrations run based on Tags
- Enforce migration version numbering rules
- Create custom metadata for the VersionInfo table