Skip to content

Instantly share code, notes, and snippets.

@jakcharlton
Created June 15, 2011 01:41
Show Gist options
  • Save jakcharlton/1026327 to your computer and use it in GitHub Desktop.
Save jakcharlton/1026327 to your computer and use it in GitHub Desktop.
Resharper File Template for FluentMigrations
<TemplatesExport family="File Templates">
<Template uid="188d3b0a-987e-48b4-b42a-2ebaa25b21fb" shortcut="" description="Fluent Migration" text="using FluentMigrator;&#xD;&#xA;&#xD;&#xA;namespace $NAMESPACE$&#xD;&#xA;{&#xD;&#xA; [Migration($MIGRATIONNUMBER$)]&#xD;&#xA; public class $CLASS$$MIGRATIONNUMBER$ : Migration&#xD;&#xA; {&#xD;&#xA; public override void Up()&#xD;&#xA; {&#xD;&#xA; $END$&#xD;&#xA; }&#xD;&#xA;&#xD;&#xA; public override void Down()&#xD;&#xA; {&#xD;&#xA;&#xD;&#xA; }&#xD;&#xA; }&#xD;&#xA;}&#xD;&#xA;" reformat="True" shortenQualifiedReferences="True">
<Scopes>
<Scope type="Everywhere" />
</Scopes>
<Categories />
<Variables>
<Variable name="NAMESPACE" expression="fileDefaultNamespace()" initialRange="0" />
<Variable name="MIGRATIONNUMBER" expression="getCurrentTime(&quot;yyyymmddhhss&quot;)" initialRange="0" />
<Variable name="CLASS" expression="getFileNameWithoutExtension()" initialRange="0" />
</Variables>
<CustomProperties>
<Property key="FileName" value="Migration" />
<Property key="Extension" value="cs" />
<Property key="ValidateFileName" value="False" />
</CustomProperties>
</Template>
</TemplatesExport>
@jakcharlton
Copy link
Author

Using FluentMigrations and Resharper - template to automatically timestamp your migration classes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment