CREATE TABLE tblimport_data(
    id BIGINT UNSIGNED PRIMARY KEY NOT NULL AUTO_INCREMENT,
    tenant_id BIGINT UNSIGNED NOT NULL,
    FOREIGN KEY (tenant_id) REFERENCES tbltenants(id) ON DELETE CASCADE ON UPDATE CASCADE,
    source VARCHAR(191) NULL DEFAULT NULL,
    what_to_import VARCHAR(191) NOT NULL,
    records_imported VARCHAR(191) NULL DEFAULT NULL,
    status VARCHAR(191) DEFAULT 'columns_to_be_mapped',
    filename VARCHAR(500) NOT NULL,
    skip_first_row TINYINT DEFAULT 0,
    added_by BIGINT UNSIGNED NOT NULL,
    added_on DATETIME NOT NULL
);

CREATE TABLE tblimport_data_columns_mapping(
    id BIGINT UNSIGNED PRIMARY KEY NOT NULL AUTO_INCREMENT,
    import_data_id BIGINT UNSIGNED NOT NULL,
    FOREIGN KEY (import_data_id) REFERENCES tblimport_data (id) ON DELETE CASCADE ON UPDATE CASCADE,
    column_number VARCHAR(191) NOT NULL,
    field_name VARCHAR(191) NOT NULL
);