Posts tagged free

Timestamp Generator Tool For Migrations

0

On my latest project, I’ve started using migrations as a way to iteratively create my database. This helps me focus on features as they evolve. Currently everything is ok, because I am the only one prototyping the system, but I started thinking about the other developers that might work on this project. What would happen when they begin writing migrations. First let’s take a look at how my current migrations look.


[Migration(1)]
public class AddUserTable : Migration
{...}

[Migration(2)]
public class AddRolesTable : Migration
{...}

[Migration(3)]
public class AddLocationsTable : Migration
{...}

Notice how it is simply numbered 1, 2, 3, etc. What happens when multiple developers are looking at the migrations and developing their own migrations. They will want to number their migration the next number in the sequence, which will be cause huge problems when they submit their changes to source control. Luckily the migration framework I am using supports integers of any kind as schema versions. The only consideration  is that migrations are executed in sequential order based on the integer. Say hello to my little friend, the Aqua Bird Consulting Timestamp generator.

image

I hooked up the little utility into Visual Studio as an external tool, similar to the “CreateGUID” tool.

image

Now anytime I need to generate an integer for my migrations, all I have to do is click that timestamp generator button and the application will come up with a generated integer. The date and time used is UTC, which means you should be ok even if you have team members around the country or even around the world. I also allow you to select the date of the timestamp. In the instance you choose to generate a timestamp from the datepicker, the UTC time will be used of the current UTC DateTime.

Hope this helps other migration users, I compiled this to work with the .Net 3.5 framework.

Aqua Bird Consulting Timestamp Generator

A Free Year Of ASP.NET Web Hosting!!!

0

Here at Aqua Bird Consulting we want to make your web development experience as seamless and painless as possible. When you get us to develop a web application or site, then we offer optional hosting for your application, free of charge for a full year. YES FREE!!! Some hosts charge up to $20 a month for .NET hosting. In a year that can be a savings of $240 dollars, that can mean more coffee and donuts for your business. The coupon is below, but you don’t need it because we make sure to mention it to all our new customers.

image

Aqua Bird Consulting + Free Hosting = Awesome

Go to Top