Untitled

mail@pastecode.io avatar
unknown
plain_text
17 days ago
1.3 kB
1
Indexable
Never
-- auto-generated definition
create table users
(
    id                bigint unsigned auto_increment
        primary key,
    slug              char(36)        not null,
    master_levels_id  bigint unsigned not null,
    agents_id         bigint unsigned null,
    master_genders_id bigint unsigned null,
    name              varchar(250)    null,
    phone             varchar(13)     null,
    email             varchar(200)    null,
    address           text            null,
    photo             text            null,
    username          varchar(255)    not null,
    password          varchar(255)    not null,
    remember_token    varchar(100)    null,
    created_at        timestamp       null,
    updated_at        timestamp       null,
    constraint users_email_unique
        unique (email),
    constraint users_username_unique
        unique (username),
    constraint users_agents_id_foreign
        foreign key (agents_id) references agents (id)
            on delete cascade,
    constraint users_master_genders_id_foreign
        foreign key (master_genders_id) references master_genders (id)
            on delete cascade,
    constraint users_master_levels_id_foreign
        foreign key (master_levels_id) references master_levels (id)
            on delete cascade
)
    collate = utf8mb4_unicode_ci;

Leave a Comment