forked from ebhomengo/niki
20 lines
869 B
SQL
20 lines
869 B
SQL
-- +migrate Up
|
|
-- please read this article to understand why we use VARCHAR(191)
|
|
-- https://www.grouparoo.com/blog/varchar-191#why-varchar-and-not-text
|
|
CREATE TABLE `benefactors` (
|
|
`id` INT PRIMARY KEY AUTO_INCREMENT,
|
|
`first_name` VARCHAR(191),
|
|
`last_name` VARCHAR(191),
|
|
`phone_number` VARCHAR(191) NOT NULL UNIQUE,
|
|
`description` TEXT,
|
|
`email` VARCHAR(191),
|
|
`gender` ENUM('male','female'),
|
|
`birth_date` TIMESTAMP,
|
|
|
|
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` TIMESTAMP
|
|
|
|
);
|
|
|
|
-- +migrate Down
|
|
DROP TABLE `benefactors`; |