
-- DROP TABLE oneit_sec_user_extension;



CREATE TABLE oneit_sec_user_extension (
    object_id int NOT NULL ,
    object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
    object_created_date datetime DEFAULT getdate() NOT NULL
    , object_type varchar(30) NOT NULL ,
    forgot_password_mail_send_date datetime NULL,
    forgot_password_key varchar(10) NULL,
    role_type varchar(200) NULL,
    roles varchar(200) NULL,
    phone varchar(30) NULL,
    verification_mail_send_date datetime NULL,
    verification_key varchar(10) NULL,
    is_account_verified char(1) NULL,
    is_email_changed char(1) NULL,
    is_disabled char(1) NULL,
    user_id numeric(12)  NULL,
    company_id numeric(12)  NULL,
    default_hiring_team_id numeric(12)  NULL
    );



ALTER TABLE oneit_sec_user_extension ADD    
    CONSTRAINT PK_oneit_sec_user_extension PRIMARY KEY 
    (
        object_id
    ) ;
    
    
    
    CREATE INDEX idx_oneit_sec_user_extension_user_id 
    ON oneit_sec_user_extension (user_id);

    CREATE INDEX idx_oneit_sec_user_extension_company_id 
    ON oneit_sec_user_extension (company_id);
