12 lines
451 B
Plaintext
12 lines
451 B
Plaintext
|
create_table("tokens") {
|
||
|
t.Column("id", "integer", {primary: true})
|
||
|
t.Column("user_id", "integer", {"unsigned": true})
|
||
|
t.Column("name", "string", {"size": 255})
|
||
|
t.Column("email", "string", {})
|
||
|
t.Column("token_hash", "string", {})
|
||
|
}
|
||
|
|
||
|
sql("ALTER TABLE tokens MODIFY token_hash varbinary(255);")
|
||
|
sql("ALTER TABLE tokens ALTER COLUMN created_at SET DEFAULT now();")
|
||
|
sql("ALTER TABLE tokens ALTER COLUMN updated_at SET DEFAULT now();")
|