Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagesql
firstline1
titlegobblin_job_config



CREATE TABLE gobblin_job_owners
`gobblin_job` (
  `id` int(11) nameNOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `description` varchar(255) NOTDEFAULT NULL,
  `schedule` varchar(64) DEFAULT emailNULL,
  `is_disabled` tinyint(1) DEFAULT '0',
  `priority` varcharsmallint(2556) NOTDEFAULT NULL,
  `configs` text,
  team_name    int(11)               DEFAULT NULL,
    team_email   int(11)               DEFAULT NULL,
    org_name     int(11)               DEFAULT NULL,
    created_date timestamp    NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updated_date timestamp    NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (email)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8;

CREATE TABLE gobblin_sync_systems
(
    name         varchar(255`owner_email` varchar(255) DEFAULT NULL,
  `source_system` varchar(255) DEFAULT NULL,
  `target_system` varchar(255) DEFAULT NULL,
  `job_template` varchar(255) DEFAULT NULL,
  `created_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`name`),
  KEY `name` (`name`),
  KEY `id` (`id`),
  KEY `gobblin_job_template_fk` (`job_template`),
  KEY `source_system` (`source_system`),
  KEY `target_system` (`target_system`),
  CONSTRAINT `gobblin_job_ibfk_1` FOREIGN KEY (`source_system`) REFERENCES `gobblin_sync_system` (`id`),
  CONSTRAINT `gobblin_job_ibfk_2` FOREIGN KEY (`target_system`) REFERENCES `gobblin_sync_system` (`id`),
  CONSTRAINT `gobblin_job_template_fk` FOREIGN KEY (`job_template`) REFERENCES `gobblin_job_template` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8;


CREATE TABLE `gobblin_job_template` (
  `name` varchar(255) NOT NULL DEFAULT '',
  `configs` text NOT NULL,
  PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE `gobblin_sync_system` (
  `id` varchar(255) NOT NULL,
  `name` varchar(64) NOT NULL,
  `type`  db_type     varchar(64) NOT NULL DEFAULT '',
  `datacenter` varchar(25564) NOTDEFAULT NULL,
  `region` varchar(64) usersDEFAULT NULL,
  `zone` varchar(64) DEFAULT NULL,
  `users` varchar(2551024) NOTDEFAULT NULL,
  `on_hold`  on_hold     tinyint(1) NOT NULL DEFAULT '0',
  `deprecated` tinyint(1)   NOT NULL DEFAULT '0',
    deprecated  `source_support` tinyint(1)   NOT NULL DEFAULT '0',
  `target_support` tinyint(1) configNOT NULL DEFAULT '0',
   `configs` text,
    created`created_datedate` timestamp    NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updated`updated_datedate` timestamp    NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (name`id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8;


CREATE TABLE gobblin_job_jobsowner
(
    idname            int(11varchar(255)      NOT NULL AUTO_INCREMENT,
    name  email        varchar(255) NOT NULL,
    team_name description   varcharint(25511)          DEFAULT NULL,
    schedule      varchar(64)           DEFAULT NULL,
    isteam_disabledemail   tinyintint(111)            DEFAULT '0',
    priority      smallint              DEFAULT 100,
    configs       text,
    owner_email   varchar(255) NOT NULL,
    sourceorg_systemname varchar(255) NOT NULL,
    #source_dataset varchar(255) int(11)         DEFAULT NULL,
    #target_dataset varchar(255)          DEFAULT NULL,
    target_system varchar(255) NOT NULL,
    created_date  timestamp    NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updated_date  timestamp    NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (nameemail),
#) ENGINE = InnoDB
  FOREIGNDEFAULT KEY (owner_email) REFERENCES gobblin_job_owners (email),
#     FOREIGN KEY (source_system) REFERENCES gobblin_sync_systems (name),
#     FOREIGN KEY (target_system) REFERENCES gobblin_sync_systems (name),
    INDEX (name),
    INDEX (id)
) AUTO_INCREMENT = 1
  ENGINE = InnoDB
  DEFAULT CHARSET = utf8;


CREATE TABLE gobblin_sync_systems_maintenance
(
    id               int(11)      CHARSET = utf8;




Alternate proposal: 

Code Block
languagesql
//Shirshanka: this will allow us to model job_config as a schema-d thing ... and evolve versions without having to use DDL to perform MySQL schema changes...  also allows to swap out a K-V store for this easily

CREATE TABLE `gobblin_job` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
    sync_system_name `name` varchar(255) NOT NULL,
  `configs` text,
 type             varchar(255) NOT NULL`version` int(11),
    start`created_timedate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  datetime    `updated_date` timestamp NOT NULL,
 DEFAULT   endCURRENT_timeTIMESTAMP ON        datetime     NOT NULL,
  UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (id`name`),
  KEY  FOREIGN KEY`name` (sync_system_name) REFERENCES gobblin_sync_systems (name`name`),
  KEY `id` (`id`)
) ENGINE = InnoDB
 AUTO_INCREMENT=1 DEFAULT CHARSET = utf8;



  • JOB MGMT. CRUD REST API

...