mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/35 Reviewed By: alexsn Differential Revision: D17394930 fbshipit-source-id: bc9d8cc6569ad457b93d47d26d143f2442f98df9
46 lines
1.3 KiB
Go
46 lines
1.3 KiB
Go
// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
|
// This source code is licensed under the Apache 2.0 license found
|
|
// in the LICENSE file in the root directory of this source tree.
|
|
|
|
// Code generated (@generated) by entc, DO NOT EDIT.
|
|
|
|
package migrate
|
|
|
|
import (
|
|
"github.com/facebookincubator/ent/dialect/sql/schema"
|
|
"github.com/facebookincubator/ent/schema/field"
|
|
)
|
|
|
|
var (
|
|
// UsersColumns holds the columns for the "users" table.
|
|
UsersColumns = []*schema.Column{
|
|
{Name: "id", Type: field.TypeInt, Increment: true},
|
|
{Name: "age", Type: field.TypeInt32},
|
|
{Name: "name", Type: field.TypeString, Size: 10},
|
|
{Name: "address", Type: field.TypeString, Nullable: true},
|
|
{Name: "renamed", Type: field.TypeString, Nullable: true},
|
|
{Name: "blob", Type: field.TypeBytes, Nullable: true, Size: 255},
|
|
}
|
|
// UsersTable holds the schema information for the "users" table.
|
|
UsersTable = &schema.Table{
|
|
Name: "users",
|
|
Columns: UsersColumns,
|
|
PrimaryKey: []*schema.Column{UsersColumns[0]},
|
|
ForeignKeys: []*schema.ForeignKey{},
|
|
Indexes: []*schema.Index{
|
|
{
|
|
Name: "name_address",
|
|
Unique: true,
|
|
Columns: []*schema.Column{UsersColumns[2], UsersColumns[3]},
|
|
},
|
|
},
|
|
}
|
|
// Tables holds all the tables in the schema.
|
|
Tables = []*schema.Table{
|
|
UsersTable,
|
|
}
|
|
)
|
|
|
|
func init() {
|
|
}
|