2012-10-12 12:37:55 -02:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Core.Persistence.DatabaseAnnotations
|
|
|
|
|
|
{
|
|
|
|
|
|
[AttributeUsage(AttributeTargets.Property)]
|
|
|
|
|
|
public class PrimaryKeyColumnAttribute : Attribute
|
|
|
|
|
|
{
|
|
|
|
|
|
public PrimaryKeyColumnAttribute()
|
|
|
|
|
|
{
|
|
|
|
|
|
Clustered = true;
|
|
|
|
|
|
AutoIncrement = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public bool Clustered { get; set; }//Defaults to true
|
|
|
|
|
|
public bool AutoIncrement { get; set; }//Default to true
|
|
|
|
|
|
public string Name { get; set; }//Overrides the default naming of a PrimaryKey constraint: PK_tableName
|
2012-10-17 10:12:30 -02:00
|
|
|
|
public string OnColumns { get; set; }
|
2012-10-12 12:37:55 -02:00
|
|
|
|
}
|
|
|
|
|
|
}
|