Add migrations

This commit is contained in:
2016-05-06 11:18:09 -04:00
parent cf3a13b77b
commit 972bb04291
9 changed files with 497 additions and 1 deletions
+8
View File
@@ -1,6 +1,8 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data;
using System.IO;
using System.IO.Compression;
using System.Linq;
@@ -31,6 +33,12 @@ namespace LeafWeb.Core.Entities
[Required(ErrorMessage = "Site Id required")]
public string SiteId { get; set; }
[Required]
[Column(TypeName = "VARCHAR")]
[StringLength(12)]
[Index("IX_UniqueToken", 1, IsUnique = true)]
public string UniqueToken { get; set; }
// [Required(ErrorMessage = "PhotosynthesisType required")]
// http://stackoverflow.com/questions/6038541/ef-validation-failing-on-update-when-using-lazy-loaded-required-properties
public virtual PhotosynthesisType PhotosynthesisType { get; set; }