forked from ebhomengo/niki
1
0
Fork 0
niki/repository/mysql/migration/1705244015_create_admins_ta...

19 lines
967 B
SQL

-- +migrate Up
CREATE TABLE `admins` (
`id` INT PRIMARY KEY AUTO_INCREMENT,
`first_name` VARCHAR(191),
`last_name` VARCHAR(191),
`password` VARCHAR(191) NOT NULL,
`phone_number` VARCHAR(191) NOT NULL UNIQUE,
`role` ENUM('super-admin','admin','agent') NOT NULL DEFAULT 'admin',
`description` TEXT,
`email` VARCHAR(191) NOT NULL UNIQUE,
`gender` ENUM('male','female'),
`status` ENUM('active','inactive') NOT NULL DEFAULT 'active',
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
-- +migrate Down
DROP TABLE `admins`;