39 lines
592 B
HCL
39 lines
592 B
HCL
table "roles" {
|
|
schema = schema.public
|
|
|
|
column "id" {
|
|
type = uuid
|
|
null = false
|
|
}
|
|
column "name" {
|
|
type = text
|
|
null = false
|
|
}
|
|
column "description" {
|
|
type = text
|
|
null = true
|
|
}
|
|
column "created_at" {
|
|
type = timestamptz
|
|
default = sql("now()")
|
|
null = false
|
|
}
|
|
|
|
column "updated_at" {
|
|
type = timestamptz
|
|
null = true
|
|
default = sql("now()")
|
|
}
|
|
column "deleted_at" {
|
|
type = timestamptz
|
|
null = true
|
|
}
|
|
|
|
primary_key {
|
|
columns = [column.id]
|
|
}
|
|
|
|
unique "roles_name_unique" {
|
|
columns = [column.name]
|
|
}
|
|
} |