updated circle with fmt formating test

This commit is contained in:
Torkel Ödegaard
2015-03-07 16:23:22 +01:00
parent ba3ba0aca7
commit d8005af8ee
7 changed files with 117 additions and 113 deletions
+21 -21
View File
@@ -6,21 +6,21 @@ func addOrgMigrations(mg *Migrator) {
orgV1 := Table{
Name: "org",
Columns: []*Column{
&Column{Name: "id", Type: DB_BigInt, IsPrimaryKey: true, IsAutoIncrement: true},
&Column{Name: "version", Type: DB_Int, Nullable: false},
&Column{Name: "name", Type: DB_NVarchar, Length: 255, Nullable: false},
&Column{Name: "address1", Type: DB_NVarchar, Length: 255, Nullable: true},
&Column{Name: "address2", Type: DB_NVarchar, Length: 255, Nullable: true},
&Column{Name: "city", Type: DB_NVarchar, Length: 255, Nullable: true},
&Column{Name: "state", Type: DB_NVarchar, Length: 255, Nullable: true},
&Column{Name: "zip_code", Type: DB_NVarchar, Length: 50, Nullable: true},
&Column{Name: "country", Type: DB_NVarchar, Length: 255, Nullable: true},
&Column{Name: "billing_email", Type: DB_NVarchar, Length: 255, Nullable: true},
&Column{Name: "created", Type: DB_DateTime, Nullable: false},
&Column{Name: "updated", Type: DB_DateTime, Nullable: false},
{Name: "id", Type: DB_BigInt, IsPrimaryKey: true, IsAutoIncrement: true},
{Name: "version", Type: DB_Int, Nullable: false},
{Name: "name", Type: DB_NVarchar, Length: 255, Nullable: false},
{Name: "address1", Type: DB_NVarchar, Length: 255, Nullable: true},
{Name: "address2", Type: DB_NVarchar, Length: 255, Nullable: true},
{Name: "city", Type: DB_NVarchar, Length: 255, Nullable: true},
{Name: "state", Type: DB_NVarchar, Length: 255, Nullable: true},
{Name: "zip_code", Type: DB_NVarchar, Length: 50, Nullable: true},
{Name: "country", Type: DB_NVarchar, Length: 255, Nullable: true},
{Name: "billing_email", Type: DB_NVarchar, Length: 255, Nullable: true},
{Name: "created", Type: DB_DateTime, Nullable: false},
{Name: "updated", Type: DB_DateTime, Nullable: false},
},
Indices: []*Index{
&Index{Cols: []string{"name"}, Type: UniqueIndex},
{Cols: []string{"name"}, Type: UniqueIndex},
},
}
@@ -31,16 +31,16 @@ func addOrgMigrations(mg *Migrator) {
orgUserV1 := Table{
Name: "org_user",
Columns: []*Column{
&Column{Name: "id", Type: DB_BigInt, IsPrimaryKey: true, IsAutoIncrement: true},
&Column{Name: "org_id", Type: DB_BigInt},
&Column{Name: "user_id", Type: DB_BigInt},
&Column{Name: "role", Type: DB_NVarchar, Length: 20},
&Column{Name: "created", Type: DB_DateTime},
&Column{Name: "updated", Type: DB_DateTime},
{Name: "id", Type: DB_BigInt, IsPrimaryKey: true, IsAutoIncrement: true},
{Name: "org_id", Type: DB_BigInt},
{Name: "user_id", Type: DB_BigInt},
{Name: "role", Type: DB_NVarchar, Length: 20},
{Name: "created", Type: DB_DateTime},
{Name: "updated", Type: DB_DateTime},
},
Indices: []*Index{
&Index{Cols: []string{"org_id"}},
&Index{Cols: []string{"org_id", "user_id"}, Type: UniqueIndex},
{Cols: []string{"org_id"}},
{Cols: []string{"org_id", "user_id"}, Type: UniqueIndex},
},
}