diff --git a/core/micro-services/build.sbt b/core/micro-services/build.sbt
index 99095c9d0f5..8df969f4c5d 100644
--- a/core/micro-services/build.sbt
+++ b/core/micro-services/build.sbt
@@ -1,8 +1,10 @@
-lazy val WorkflowCore = project in file("workflow-core")
+lazy val Dao = project in file("dao")
+lazy val WorkflowCore = (project in file("workflow-core")).dependsOn(Dao)
+lazy val WorkflowOperator = (project in file("workflow-operator")).dependsOn(WorkflowCore)
// root project definition
lazy val MicroServices = (project in file("."))
- .aggregate(WorkflowCore)
+ .aggregate(Dao, WorkflowCore, WorkflowOperator)
.settings(
name := "micro-services",
version := "0.1.0",
diff --git a/core/micro-services/dao/build.sbt b/core/micro-services/dao/build.sbt
new file mode 100644
index 00000000000..f7191b016ba
--- /dev/null
+++ b/core/micro-services/dao/build.sbt
@@ -0,0 +1,91 @@
+/////////////////////////////////////////////////////////////////////////////
+// Project Settings
+/////////////////////////////////////////////////////////////////////////////
+
+name := "dao"
+organization := "edu.uci.ics"
+version := "0.1.0"
+scalaVersion := "2.13.12"
+
+enablePlugins(JavaAppPackaging)
+
+// Enable semanticdb for Scalafix
+ThisBuild / semanticdbEnabled := true
+ThisBuild / semanticdbVersion := scalafixSemanticdb.revision
+
+// Manage dependency conflicts by always using the latest revision
+ThisBuild / conflictManager := ConflictManager.latestRevision
+
+// Restrict parallel execution of tests to avoid conflicts
+Global / concurrentRestrictions += Tags.limit(Tags.Test, 1)
+
+
+/////////////////////////////////////////////////////////////////////////////
+// Compiler Options
+/////////////////////////////////////////////////////////////////////////////
+
+// Scala compiler options
+Compile / scalacOptions ++= Seq(
+ "-Xelide-below", "WARNING", // Turn on optimizations with "WARNING" as the threshold
+ "-feature", // Check feature warnings
+ "-deprecation", // Check deprecation warnings
+ "-Ywarn-unused:imports" // Check for unused imports
+)
+
+
+/////////////////////////////////////////////////////////////////////////////
+// ScalaPB Configuration
+/////////////////////////////////////////////////////////////////////////////
+
+// Exclude some proto files
+PB.generate / excludeFilter := "scalapb.proto"
+
+// Set the protoc version for ScalaPB
+ThisBuild / PB.protocVersion := "3.19.4"
+
+// ScalaPB code generation for .proto files
+Compile / PB.targets := Seq(
+ scalapb.gen(singleLineToProtoString = true) -> (Compile / sourceManaged).value
+)
+
+// Mark the ScalaPB-generated directory as a generated source root
+Compile / managedSourceDirectories += (Compile / sourceManaged).value
+
+// ScalaPB library dependencies
+libraryDependencies ++= Seq(
+ "com.thesamet.scalapb" %% "scalapb-runtime" % scalapb.compiler.Version.scalapbVersion % "protobuf",
+ "com.thesamet.scalapb" %% "scalapb-json4s" % "0.12.0" // For ScalaPB 0.11.x
+)
+
+// Enable protobuf compilation in Test
+Test / PB.protoSources += PB.externalSourcePath.value
+
+
+/////////////////////////////////////////////////////////////////////////////
+// Test-related Dependencies
+/////////////////////////////////////////////////////////////////////////////
+
+libraryDependencies ++= Seq(
+ "org.scalamock" %% "scalamock" % "5.2.0" % Test, // ScalaMock
+ "org.scalatest" %% "scalatest" % "3.2.15" % Test, // ScalaTest
+ "junit" % "junit" % "4.13.2" % Test, // JUnit
+ "com.novocode" % "junit-interface" % "0.11" % Test // SBT interface for JUnit
+)
+
+/////////////////////////////////////////////////////////////////////////////
+// Jooq-related Dependencies
+/////////////////////////////////////////////////////////////////////////////
+
+libraryDependencies ++= Seq(
+ "org.jooq" % "jooq" % "3.14.16",
+ "org.jooq" % "jooq-codegen" % "3.12.4"
+)
+
+/////////////////////////////////////////////////////////////////////////////
+// Additional Dependencies
+/////////////////////////////////////////////////////////////////////////////
+
+libraryDependencies ++= Seq(
+ "mysql" % "mysql-connector-java" % "8.0.23", // MySQL connector
+ "org.yaml" % "snakeyaml" % "1.29" // YAML reader
+)
\ No newline at end of file
diff --git a/core/micro-services/dao/src/main/resources/dao-config.yaml b/core/micro-services/dao/src/main/resources/dao-config.yaml
new file mode 100644
index 00000000000..2621fb5a44c
--- /dev/null
+++ b/core/micro-services/dao/src/main/resources/dao-config.yaml
@@ -0,0 +1,4 @@
+jdbc:
+ url: "jdbc:mysql://localhost:3306/texera_db?serverTimezone=UTC"
+ username: "root"
+ password: "123456"
\ No newline at end of file
diff --git a/core/micro-services/dao/src/main/resources/jooq-conf.xml b/core/micro-services/dao/src/main/resources/jooq-conf.xml
new file mode 100644
index 00000000000..80cbeff0487
--- /dev/null
+++ b/core/micro-services/dao/src/main/resources/jooq-conf.xml
@@ -0,0 +1,45 @@
+
+
+
+ false
+
+ true
+ true
+
+
+ org.jooq.codegen.JavaGenerator
+
+
+
+ org.jooq.meta.mysql.MySQLDatabase
+
+
+ texera_db
+
+
+ .*
+
+
+ (test_.*)|(ignore_.*)
+
+
+
+
+
+ edu.uci.ics.texera.model.jooq.generated
+
+
+ dao/src/main/scala
+
+
+
diff --git a/core/micro-services/dao/src/main/resources/sql/texera_ddl.sql b/core/micro-services/dao/src/main/resources/sql/texera_ddl.sql
new file mode 100644
index 00000000000..4785301269d
--- /dev/null
+++ b/core/micro-services/dao/src/main/resources/sql/texera_ddl.sql
@@ -0,0 +1,212 @@
+CREATE SCHEMA IF NOT EXISTS `texera_db`;
+USE `texera_db`;
+
+DROP TABLE IF EXISTS `workflow_runtime_statistics`;
+DROP TABLE IF EXISTS `workflow_user_access`;
+DROP TABLE IF EXISTS `workflow_of_user`;
+DROP TABLE IF EXISTS `user_config`;
+DROP TABLE IF EXISTS `user`;
+DROP TABLE IF EXISTS `workflow`;
+DROP TABLE IF EXISTS `workflow_version`;
+DROP TABLE IF EXISTS `project`;
+DROP TABLE IF EXISTS `workflow_of_project`;
+DROP TABLE IF EXISTS `workflow_executions`;
+DROP TABLE IF EXISTS `dataset`;
+DROP TABLE IF EXISTS `dataset_user_access`;
+DROP TABLE IF EXISTS `dataset_version`;
+
+SET PERSIST time_zone = '+00:00'; -- this line is mandatory
+SET PERSIST sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
+
+CREATE TABLE IF NOT EXISTS user
+(
+ `uid` INT UNSIGNED AUTO_INCREMENT NOT NULL,
+ `name` VARCHAR(256) NOT NULL,
+ `email` VARCHAR(256) UNIQUE,
+ `password` VARCHAR(256),
+ `google_id` VARCHAR(256) UNIQUE,
+ `role` ENUM('INACTIVE', 'RESTRICTED', 'REGULAR', 'ADMIN') NOT NULL DEFAULT 'INACTIVE',
+ `google_avatar` VARCHAR(100) null,
+ PRIMARY KEY (`uid`),
+ CONSTRAINT CK_nulltest
+ CHECK (`password` IS NOT NULL OR `google_id` IS NOT NULL)
+) ENGINE = INNODB,
+-- start auto increment userID from 1 because userID 0 means user not exists
+ AUTO_INCREMENT = 1;
+
+CREATE TABLE IF NOT EXISTS user_config
+(
+ `uid` INT UNSIGNED NOT NULL,
+ `key` varchar(256) NOT NULL,
+ `value` text NOT NULL,
+ PRIMARY KEY (`uid`, `key`),
+ FOREIGN KEY (`uid`) REFERENCES user (`uid`) ON DELETE CASCADE
+) ENGINE = InnoDB;
+
+CREATE TABLE IF NOT EXISTS workflow
+(
+ `name` VARCHAR(128) NOT NULL,
+ `description` VARCHAR(500),
+ `wid` INT UNSIGNED AUTO_INCREMENT NOT NULL,
+ `content` LONGTEXT NOT NULL,
+ `creation_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `last_modified_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`wid`)
+) ENGINE = INNODB,
+ AUTO_INCREMENT = 1;
+
+CREATE TABLE IF NOT EXISTS workflow_of_user
+(
+ `uid` INT UNSIGNED NOT NULL,
+ `wid` INT UNSIGNED NOT NULL,
+ PRIMARY KEY (`uid`, `wid`),
+ FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE,
+ FOREIGN KEY (`wid`) REFERENCES `workflow` (`wid`) ON DELETE CASCADE
+) ENGINE = INNODB;
+
+CREATE TABLE IF NOT EXISTS workflow_user_access
+(
+ `uid` INT UNSIGNED NOT NULL,
+ `wid` INT UNSIGNED NOT NULL,
+ `privilege` ENUM('NONE', 'READ', 'WRITE') NOT NULL DEFAULT 'NONE',
+ PRIMARY KEY (`uid`, `wid`),
+ FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE,
+ FOREIGN KEY (`wid`) REFERENCES `workflow` (`wid`) ON DELETE CASCADE
+) ENGINE = INNODB;
+
+CREATE TABLE IF NOT EXISTS workflow_version
+(
+ `vid` INT UNSIGNED AUTO_INCREMENT NOT NULL,
+ `wid` INT UNSIGNED NOT NULL,
+ `content` TEXT NOT NULL,
+ `creation_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`vid`),
+ FOREIGN KEY (`wid`) REFERENCES `workflow` (`wid`) ON DELETE CASCADE
+) ENGINE = INNODB;
+
+CREATE TABLE IF NOT EXISTS project
+(
+ `pid` INT UNSIGNED AUTO_INCREMENT NOT NULL,
+ `name` VARCHAR(128) NOT NULL,
+ `description` VARCHAR(10000),
+ `owner_id` INT UNSIGNED NOT NULL,
+ `creation_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `color` VARCHAR(6),
+ UNIQUE(`owner_id`, `name`),
+ PRIMARY KEY (`pid`),
+ FOREIGN KEY (`owner_id`) REFERENCES user (`uid`) ON DELETE CASCADE
+) ENGINE = INNODB,
+ AUTO_INCREMENT = 1;
+
+CREATE TABLE IF NOT EXISTS workflow_of_project
+(
+ `wid` INT UNSIGNED NOT NULL,
+ `pid` INT UNSIGNED NOT NULL,
+ PRIMARY KEY (`wid`, `pid`),
+ FOREIGN KEY (`wid`) REFERENCES `workflow` (`wid`) ON DELETE CASCADE,
+ FOREIGN KEY (`pid`) REFERENCES `project` (`pid`) ON DELETE CASCADE
+) ENGINE = INNODB;
+
+CREATE TABLE IF NOT EXISTS project_user_access
+(
+ `uid` INT UNSIGNED NOT NULL,
+ `pid` INT UNSIGNED NOT NULL,
+ `privilege` ENUM('NONE', 'READ', 'WRITE') NOT NULL DEFAULT 'NONE',
+ PRIMARY KEY (`uid`, `pid`),
+ FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE,
+ FOREIGN KEY (`pid`) REFERENCES `project` (`pid`) ON DELETE CASCADE
+) ENGINE = INNODB;
+
+CREATE TABLE IF NOT EXISTS workflow_executions
+(
+ `eid` INT UNSIGNED AUTO_INCREMENT NOT NULL,
+ `vid` INT UNSIGNED NOT NULL,
+ `uid` INT UNSIGNED NOT NULL,
+ `status` TINYINT NOT NULL DEFAULT 1,
+ `result` TEXT, /* pointer to volume */
+ `starting_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `last_update_time` TIMESTAMP,
+ `bookmarked` BOOLEAN DEFAULT FALSE,
+ `name` VARCHAR(128) NOT NULL DEFAULT 'Untitled Execution',
+ `environment_version` VARCHAR(128) NOT NULL,
+ `log_location` TEXT, /* uri to log storage */
+ PRIMARY KEY (`eid`),
+ FOREIGN KEY (`vid`) REFERENCES `workflow_version` (`vid`) ON DELETE CASCADE,
+ FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE
+) ENGINE = INNODB;
+
+CREATE TABLE IF NOT EXISTS public_project
+(
+ `pid` INT UNSIGNED NOT NULL,
+ `uid` INT UNSIGNED,
+ PRIMARY KEY (`pid`),
+ FOREIGN KEY (`pid`) REFERENCES `project` (`pid`) ON DELETE CASCADE
+) ENGINE = INNODB;
+
+CREATE TABLE IF NOT EXISTS workflow_runtime_statistics
+(
+ `workflow_id` INT UNSIGNED NOT NULL,
+ `execution_id` INT UNSIGNED NOT NULL,
+ `operator_id` VARCHAR(100) NOT NULL,
+ `time` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
+ `input_tuple_cnt` INT UNSIGNED NOT NULL DEFAULT 0,
+ `output_tuple_cnt` INT UNSIGNED NOT NULL DEFAULT 0,
+ `status` TINYINT NOT NULL DEFAULT 1,
+ `data_processing_time` BIGINT UNSIGNED NOT NULL DEFAULT 0,
+ `control_processing_time` BIGINT UNSIGNED NOT NULL DEFAULT 0,
+ `idle_time` BIGINT UNSIGNED NOT NULL DEFAULT 0,
+ `num_workers` INT UNSIGNED NOT NULL DEFAULT 0,
+ PRIMARY KEY (`workflow_id`, `execution_id`, `operator_id`, `time`),
+ FOREIGN KEY (`workflow_id`) REFERENCES `workflow` (`wid`) ON DELETE CASCADE,
+ FOREIGN KEY (`execution_id`) REFERENCES `workflow_executions` (`eid`) ON DELETE CASCADE
+) ENGINE = INNODB;
+
+CREATE TABLE IF NOT EXISTS dataset
+(
+ `did` INT UNSIGNED AUTO_INCREMENT NOT NULL,
+ `owner_uid` INT UNSIGNED NOT NULL,
+ `name` VARCHAR(128) NOT NULL,
+ `is_public` TINYINT NOT NULL DEFAULT 1,
+ `description` VARCHAR(512) NOT NULL,
+ `creation_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY(`did`),
+ FOREIGN KEY (`owner_uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE
+ ) ENGINE = INNODB;
+
+CREATE TABLE IF NOT EXISTS dataset_user_access
+(
+ `did` INT UNSIGNED NOT NULL,
+ `uid` INT UNSIGNED NOT NULL,
+ `privilege` ENUM('NONE', 'READ', 'WRITE') NOT NULL DEFAULT 'NONE',
+ PRIMARY KEY(`did`, `uid`),
+ FOREIGN KEY (`did`) REFERENCES `dataset` (`did`) ON DELETE CASCADE,
+ FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE
+ ) ENGINE = INNODB;
+
+CREATE TABLE IF NOT EXISTS dataset_version
+(
+ `dvid` INT UNSIGNED AUTO_INCREMENT NOT NULL,
+ `did` INT UNSIGNED NOT NULL,
+ `creator_uid` INT UNSIGNED NOT NULL,
+ `name` VARCHAR(128) NOT NULL,
+ `version_hash` VARCHAR(64) NOT NULL,
+ `creation_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY(`dvid`),
+ FOREIGN KEY (`did`) REFERENCES `dataset` (`did`) ON DELETE CASCADE
+ ) ENGINE = INNODB;
+
+
+-- create fulltext search indexes
+
+CREATE FULLTEXT INDEX `idx_workflow_name_description_content` ON `texera_db`.`workflow` (name, description, content);
+
+CREATE FULLTEXT INDEX `idx_user_name` ON `texera_db`.`user` (name);
+
+CREATE FULLTEXT INDEX `idx_user_project_name_description` ON `texera_db`.`project` (name, description);
+
+CREATE FULLTEXT INDEX `idx_dataset_name_description` ON `texera_db`.`dataset` (name, description);
+
+CREATE FULLTEXT INDEX `idx_dataset_version_name` ON `texera_db`.`dataset_version` (name);
+
+ALTER TABLE workflow
+ADD is_published BOOLEAN NOT NULL DEFAULT false;
\ No newline at end of file
diff --git a/core/micro-services/dao/src/main/resources/sql/tweets.sql b/core/micro-services/dao/src/main/resources/sql/tweets.sql
new file mode 100644
index 00000000000..d0a7c403ce2
--- /dev/null
+++ b/core/micro-services/dao/src/main/resources/sql/tweets.sql
@@ -0,0 +1,30 @@
+CREATE TABLE TABLE_NAME
+(
+ id BIGINT NOT NULL PRIMARY KEY,
+ created_at DATETIME NULL,
+ text VARCHAR(500) CHARSET utf8mb4 NULL,
+ in_reply_to_status_id BIGINT NULL,
+ in_reply_to_user_id BIGINT NULL,
+ favourites_count INT NULL,
+ retweet_count INT NULL,
+ lang VARCHAR(10) NULL,
+ retweeted BOOLEAN NULL,
+ hashtags VARCHAR(500) CHARSET utf8mb4 NULL,
+ user_mentions VARCHAR(500) CHARSET utf8mb4 NULL,
+ user_id BIGINT NULL,
+ user_name VARCHAR(500) CHARSET utf8mb4 NULL,
+ user_screen_name VARCHAR(500) CHARSET utf8mb4 NULL,
+ user_location VARCHAR(500) NULL,
+ user_description VARCHAR(500) CHARSET utf8mb4 NULL,
+ user_followers_count INT NULL,
+ user_friends_count INT NULL,
+ user_statues_count INT NULL,
+ stateName VARCHAR(100) NULL,
+ countyName VARCHAR(100) NULL,
+ cityName VARCHAR(100) NULL,
+ country VARCHAR(100) NULL,
+ bounding_box VARCHAR(500) NULL
+);
+
+CREATE FULLTEXT INDEX text_index on TABLE_NAME (text);
+CREATE INDEX created_at_index ON TABLE_NAME (created_at);
diff --git a/core/micro-services/dao/src/main/resources/sql/update/01.sql b/core/micro-services/dao/src/main/resources/sql/update/01.sql
new file mode 100644
index 00000000000..ee5e62e2e7b
--- /dev/null
+++ b/core/micro-services/dao/src/main/resources/sql/update/01.sql
@@ -0,0 +1,7 @@
+USE `texera_db`;
+CREATE TABLE IF NOT EXISTS public_project
+(
+ `pid` INT UNSIGNED NOT NULL,
+ PRIMARY KEY (`pid`),
+ FOREIGN KEY (`pid`) REFERENCES `project` (`pid`) ON DELETE CASCADE
+ ) ENGINE = INNODB;
\ No newline at end of file
diff --git a/core/micro-services/dao/src/main/resources/sql/update/02.sql b/core/micro-services/dao/src/main/resources/sql/update/02.sql
new file mode 100644
index 00000000000..220cdcf2c68
--- /dev/null
+++ b/core/micro-services/dao/src/main/resources/sql/update/02.sql
@@ -0,0 +1,3 @@
+USE `texera_db`;
+ALTER table public_project
+ ADD uid int unsigned null;
diff --git a/core/micro-services/dao/src/main/resources/sql/update/03.sql b/core/micro-services/dao/src/main/resources/sql/update/03.sql
new file mode 100644
index 00000000000..2d87f752bca
--- /dev/null
+++ b/core/micro-services/dao/src/main/resources/sql/update/03.sql
@@ -0,0 +1,3 @@
+USE `texera_db`;
+ALTER table workflow
+ MODIFY content longtext not null;
diff --git a/core/micro-services/dao/src/main/resources/sql/update/04.sql b/core/micro-services/dao/src/main/resources/sql/update/04.sql
new file mode 100644
index 00000000000..1c8c05a82e8
--- /dev/null
+++ b/core/micro-services/dao/src/main/resources/sql/update/04.sql
@@ -0,0 +1,14 @@
+USE `texera_db`;
+CREATE TABLE IF NOT EXISTS workflow_runtime_statistics
+(
+ `workflow_id` INT UNSIGNED NOT NULL,
+ `execution_id` INT UNSIGNED NOT NULL,
+ `operator_id` VARCHAR(100) NOT NULL,
+ `time` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
+ `input_tuple_cnt` INT UNSIGNED NOT NULL DEFAULT 0,
+ `output_tuple_cnt` INT UNSIGNED NOT NULL DEFAULT 0,
+ `status` TINYINT NOT NULL DEFAULT 1,
+ PRIMARY KEY (`workflow_id`, `execution_id`, `operator_id`, `time`),
+ FOREIGN KEY (`workflow_id`) REFERENCES `workflow` (`wid`) ON DELETE CASCADE,
+ FOREIGN KEY (`execution_id`) REFERENCES `workflow_executions` (`eid`) ON DELETE CASCADE
+) ENGINE = INNODB;
diff --git a/core/micro-services/dao/src/main/resources/sql/update/05.sql b/core/micro-services/dao/src/main/resources/sql/update/05.sql
new file mode 100644
index 00000000000..7d9bb0b5d20
--- /dev/null
+++ b/core/micro-services/dao/src/main/resources/sql/update/05.sql
@@ -0,0 +1,2 @@
+ALTER TABLE workflow_executions
+ADD log_location TEXT;
\ No newline at end of file
diff --git a/core/micro-services/dao/src/main/resources/sql/update/06.sql b/core/micro-services/dao/src/main/resources/sql/update/06.sql
new file mode 100644
index 00000000000..49cbc0759a0
--- /dev/null
+++ b/core/micro-services/dao/src/main/resources/sql/update/06.sql
@@ -0,0 +1,8 @@
+USE `texera_db`;
+ALTER TABLE workflow_runtime_statistics
+ADD (
+`data_processing_time` BIGINT UNSIGNED NOT NULL DEFAULT 0,
+`control_processing_time` BIGINT UNSIGNED NOT NULL DEFAULT 0,
+`idle_time` BIGINT UNSIGNED NOT NULL DEFAULT 0,
+`num_workers` INT UNSIGNED NOT NULL DEFAULT 0
+)
diff --git a/core/micro-services/dao/src/main/resources/sql/update/07.sql b/core/micro-services/dao/src/main/resources/sql/update/07.sql
new file mode 100644
index 00000000000..0b8d8463f30
--- /dev/null
+++ b/core/micro-services/dao/src/main/resources/sql/update/07.sql
@@ -0,0 +1,41 @@
+USE `texera_db`;
+
+-- Create new tables for dataset management
+CREATE TABLE IF NOT EXISTS dataset
+(
+ `did` INT UNSIGNED AUTO_INCREMENT NOT NULL,
+ `owner_uid` INT UNSIGNED NOT NULL,
+ `name` VARCHAR(128) NOT NULL,
+ `is_public` TINYINT NOT NULL DEFAULT 1,
+ `storage_path` VARCHAR(512) NOT NULL,
+ `description` VARCHAR(512) NOT NULL,
+ `creation_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY(`did`),
+ FOREIGN KEY (`owner_uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE
+) ENGINE = INNODB;
+
+CREATE TABLE IF NOT EXISTS dataset_user_access
+(
+ `did` INT UNSIGNED NOT NULL,
+ `uid` INT UNSIGNED NOT NULL,
+ `privilege` ENUM('NONE', 'READ', 'WRITE') NOT NULL DEFAULT 'NONE',
+ PRIMARY KEY(`did`, `uid`),
+ FOREIGN KEY (`did`) REFERENCES `dataset` (`did`) ON DELETE CASCADE,
+ FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE
+) ENGINE = INNODB;
+
+CREATE TABLE IF NOT EXISTS dataset_version
+(
+ `dvid` INT UNSIGNED AUTO_INCREMENT NOT NULL,
+ `did` INT UNSIGNED NOT NULL,
+ `creator_uid` INT UNSIGNED NOT NULL,
+ `name` VARCHAR(128) NOT NULL,
+ `version_hash` VARCHAR(64) NOT NULL,
+ `creation_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY(`dvid`),
+ FOREIGN KEY (`did`) REFERENCES `dataset` (`did`) ON DELETE CASCADE
+) ENGINE = INNODB;
+
+-- Create fulltext indexes for the new tables
+CREATE FULLTEXT INDEX `idx_dataset_name_description` ON `texera_db`.`dataset` (name, description);
+CREATE FULLTEXT INDEX `idx_dataset_version_name` ON `texera_db`.`dataset_version` (name);
\ No newline at end of file
diff --git a/core/micro-services/dao/src/main/resources/sql/update/08.sql b/core/micro-services/dao/src/main/resources/sql/update/08.sql
new file mode 100644
index 00000000000..d17014f40a9
--- /dev/null
+++ b/core/micro-services/dao/src/main/resources/sql/update/08.sql
@@ -0,0 +1,4 @@
+USE `texera_db`;
+
+ALTER TABLE dataset
+MODIFY COLUMN storage_path VARCHAR(512) NOT NULL DEFAULT '';
diff --git a/core/micro-services/dao/src/main/resources/sql/update/09.sql b/core/micro-services/dao/src/main/resources/sql/update/09.sql
new file mode 100644
index 00000000000..276e684408c
--- /dev/null
+++ b/core/micro-services/dao/src/main/resources/sql/update/09.sql
@@ -0,0 +1,40 @@
+USE `texera_db`;
+
+CREATE TABLE IF NOT EXISTS environment
+(
+ `eid` INT UNSIGNED AUTO_INCREMENT NOT NULL,
+ `owner_uid` INT UNSIGNED NOT NULL,
+ `name` VARCHAR(128) NOT NULL DEFAULT 'Untitled Environment',
+ `description` VARCHAR(1000),
+ `creation_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`eid`),
+ FOREIGN KEY (`owner_uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE
+) ENGINE = INNODB;
+
+CREATE TABLE IF NOT EXISTS environment_of_workflow
+(
+ `eid` INT UNSIGNED NOT NULL,
+ `wid` INT UNSIGNED NOT NULL,
+ PRIMARY KEY (`eid`, `wid`),
+ FOREIGN KEY (`wid`) REFERENCES `workflow` (`wid`) ON DELETE CASCADE,
+ FOREIGN KEY (`eid`) REFERENCES `environment` (`eid`) ON DELETE CASCADE
+) ENGINE = INNODB;
+
+CREATE TABLE IF NOT EXISTS dataset_of_environment
+(
+ `did` INT UNSIGNED NOT NULL,
+ `eid` INT UNSIGNED NOT NULL,
+ `dvid` INT UNSIGNED NOT NULL,
+ PRIMARY KEY (`did`, `eid`),
+ FOREIGN KEY (`eid`) REFERENCES `environment` (`eid`) ON DELETE CASCADE,
+ FOREIGN KEY (`dvid`) REFERENCES `dataset_version` (`dvid`) ON DELETE CASCADE
+) ENGINE = INNODB;
+
+-- Add the `environment_eid` column to the `workflow_executions` table
+ALTER TABLE workflow_executions
+ADD COLUMN `environment_eid` INT UNSIGNED;
+
+-- Add the foreign key constraint for `environment_eid`
+ALTER TABLE workflow_executions
+ADD CONSTRAINT fk_environment_eid
+FOREIGN KEY (`environment_eid`) REFERENCES environment(`eid`) ON DELETE SET NULL;
\ No newline at end of file
diff --git a/core/micro-services/dao/src/main/resources/sql/update/10.sql b/core/micro-services/dao/src/main/resources/sql/update/10.sql
new file mode 100644
index 00000000000..90741e2d842
--- /dev/null
+++ b/core/micro-services/dao/src/main/resources/sql/update/10.sql
@@ -0,0 +1,3 @@
+USE `texera_db`;
+alter table user
+ add google_avatar VARCHAR(100) null;
\ No newline at end of file
diff --git a/core/micro-services/dao/src/main/resources/sql/update/11.sql b/core/micro-services/dao/src/main/resources/sql/update/11.sql
new file mode 100644
index 00000000000..bd8ef05e082
--- /dev/null
+++ b/core/micro-services/dao/src/main/resources/sql/update/11.sql
@@ -0,0 +1,3 @@
+USE `texera_db`;
+
+ALTER TABLE dataset DROP COLUMN storage_path;
diff --git a/core/micro-services/dao/src/main/resources/sql/update/12.sql b/core/micro-services/dao/src/main/resources/sql/update/12.sql
new file mode 100644
index 00000000000..24bd29ce7ab
--- /dev/null
+++ b/core/micro-services/dao/src/main/resources/sql/update/12.sql
@@ -0,0 +1,4 @@
+USE `texera_db`;
+
+ALTER TABLE texera_db.workflow_runtime_statistics
+ MODIFY COLUMN operator_id VARCHAR(512);
\ No newline at end of file
diff --git a/core/micro-services/dao/src/main/resources/sql/update/13.sql b/core/micro-services/dao/src/main/resources/sql/update/13.sql
new file mode 100644
index 00000000000..3816506fe51
--- /dev/null
+++ b/core/micro-services/dao/src/main/resources/sql/update/13.sql
@@ -0,0 +1,19 @@
+use `texera_db`;
+
+ALTER TABLE `environment_of_workflow`
+ DROP FOREIGN KEY `environment_of_workflow_ibfk_2`;
+
+ALTER TABLE `dataset_of_environment`
+ DROP FOREIGN KEY `dataset_of_environment_ibfk_1`;
+
+ALTER TABLE `dataset_of_environment`
+ DROP FOREIGN KEY `dataset_of_environment_ibfk_2`;
+-- Dropping the dependent tables
+DROP TABLE IF EXISTS `environment_of_workflow`;
+DROP TABLE IF EXISTS `dataset_of_environment`;
+
+-- Dropping the environment table
+DROP TABLE IF EXISTS `environment`;
+
+ALTER TABLE `workflow_executions`
+ DROP COLUMN `environment_eid`;
\ No newline at end of file
diff --git a/core/micro-services/dao/src/main/resources/sql/update/14.sql b/core/micro-services/dao/src/main/resources/sql/update/14.sql
new file mode 100644
index 00000000000..b15ae631c87
--- /dev/null
+++ b/core/micro-services/dao/src/main/resources/sql/update/14.sql
@@ -0,0 +1,6 @@
+use `texera_db`;
+
+DROP TABLE IF EXISTS `user_file_access`;
+DROP TABLE IF EXISTS `file_of_project`;
+DROP TABLE IF EXISTS `file_of_workflow`;
+DROP TABLE IF EXISTS `file`;
\ No newline at end of file
diff --git a/core/micro-services/dao/src/main/resources/sql/update/15.sql b/core/micro-services/dao/src/main/resources/sql/update/15.sql
new file mode 100644
index 00000000000..83108ef9ec7
--- /dev/null
+++ b/core/micro-services/dao/src/main/resources/sql/update/15.sql
@@ -0,0 +1,4 @@
+USE `texera_db`;
+
+ALTER TABLE workflow
+ADD is_published BOOLEAN NOT NULL DEFAULT false;
\ No newline at end of file
diff --git a/core/micro-services/dao/src/main/resources/sql/update/fix_groupby.sql b/core/micro-services/dao/src/main/resources/sql/update/fix_groupby.sql
new file mode 100644
index 00000000000..c813f9d0acc
--- /dev/null
+++ b/core/micro-services/dao/src/main/resources/sql/update/fix_groupby.sql
@@ -0,0 +1 @@
+SET PERSIST sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
\ No newline at end of file
diff --git a/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/DaoConfig.scala b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/DaoConfig.scala
new file mode 100644
index 00000000000..a5f4edb58a5
--- /dev/null
+++ b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/DaoConfig.scala
@@ -0,0 +1,24 @@
+package edu.uci.ics.texera
+
+import org.yaml.snakeyaml.Yaml
+
+import java.io.File
+import java.nio.file.Path
+import java.util.{Map => JMap}
+import scala.jdk.CollectionConverters._
+
+object DaoConfig {
+ private val conf: Map[String, Any] = {
+ val yaml = new Yaml()
+ val inputStream = getClass.getClassLoader.getResourceAsStream("dao-config.yaml")
+ val javaConf = yaml.load(inputStream).asInstanceOf[JMap[String, Any]].asScala.toMap
+
+ // convert the jdbc section
+ val jdbcMap = javaConf("jdbc").asInstanceOf[JMap[String, Any]].asScala.toMap
+ javaConf.updated("jdbc", jdbcMap)
+ }
+
+ val jdbcUrl: String = conf("jdbc").asInstanceOf[Map[String, String]]("url")
+ val jdbcUsername: String = conf("jdbc").asInstanceOf[Map[String, String]]("username")
+ val jdbcPassword: String = conf("jdbc").asInstanceOf[Map[String, String]]("password")
+}
diff --git a/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/JooqCodeGenerator.java b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/JooqCodeGenerator.java
new file mode 100644
index 00000000000..19976c7e53c
--- /dev/null
+++ b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/JooqCodeGenerator.java
@@ -0,0 +1,42 @@
+package edu.uci.ics.texera;
+
+
+import org.jooq.codegen.GenerationTool;
+import org.jooq.meta.jaxb.Configuration;
+import org.jooq.meta.jaxb.Jdbc;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+
+/**
+ * This class is used to generate java classes representing the sql table in Texera database
+ * These auto generated classes are essential for the connection between backend and database when using JOOQ library.
+ *
+ * Every time the table in the Texera database changes, including creating, dropping and modifying the tables,
+ * this class must be run to update the corresponding java classes.
+ *
+ * Remember to change the username and password to your owns before you run this class.
+ *
+ * The username, password and connection url is located in texera\core\conf\jdbc.conf
+ * The configuration file is located in texera\core\conf\jooq-conf.xml
+ */
+public class JooqCodeGenerator {
+
+ public static void main(String[] args) throws Exception {
+ Path jooqXmlPath = Path.of("dao").resolve("src").resolve("main").resolve("resources").resolve("jooq-conf.xml");
+ Configuration jooqConfig = GenerationTool.load(Files.newInputStream(jooqXmlPath));
+
+ Jdbc jooqJdbcConfig = new Jdbc();
+ jooqJdbcConfig.setDriver("com.mysql.cj.jdbc.Driver");
+ jooqJdbcConfig.setUrl(DaoConfig.jdbcUrl());
+ jooqJdbcConfig.setUsername(DaoConfig.jdbcUsername());
+ jooqJdbcConfig.setPassword(DaoConfig.jdbcPassword());
+ jooqConfig.setJdbc(jooqJdbcConfig);
+
+ GenerationTool.generate(jooqConfig);
+ }
+
+}
+
+
+
diff --git a/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/SqlServer.java b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/SqlServer.java
new file mode 100644
index 00000000000..74a7bb933a7
--- /dev/null
+++ b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/SqlServer.java
@@ -0,0 +1,28 @@
+package edu.uci.ics.texera;
+
+import com.mysql.cj.jdbc.MysqlDataSource;
+import org.jooq.DSLContext;
+import org.jooq.SQLDialect;
+import org.jooq.impl.DSL;
+
+public final class SqlServer {
+ public static final SQLDialect SQL_DIALECT = SQLDialect.MYSQL;
+ private static final MysqlDataSource dataSource;
+ public static DSLContext context;
+
+ static {
+ dataSource = new MysqlDataSource();
+ dataSource.setUrl(DaoConfig.jdbcUrl());
+ dataSource.setUser(DaoConfig.jdbcUsername());
+ dataSource.setPassword(DaoConfig.jdbcPassword());
+ context = DSL.using(dataSource, SQL_DIALECT);
+ }
+
+ public static DSLContext createDSLContext() {
+ return context;
+ }
+
+ public static void replaceDSLContext(DSLContext newContext){
+ context = newContext;
+ }
+}
diff --git a/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/DefaultCatalog.java b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/DefaultCatalog.java
new file mode 100644
index 00000000000..1a6a2fbb7f6
--- /dev/null
+++ b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/DefaultCatalog.java
@@ -0,0 +1,51 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package edu.uci.ics.texera.model.jooq.generated;
+
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.jooq.Schema;
+import org.jooq.impl.CatalogImpl;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class DefaultCatalog extends CatalogImpl {
+
+ private static final long serialVersionUID = -1547128708;
+
+ /**
+ * The reference instance of
+ */
+ public static final DefaultCatalog DEFAULT_CATALOG = new DefaultCatalog();
+
+ /**
+ * The schema texera_db.
+ */
+ public final TexeraDb TEXERA_DB = edu.uci.ics.texera.model.jooq.generated.TexeraDb.TEXERA_DB;
+
+ /**
+ * No further instances allowed
+ */
+ private DefaultCatalog() {
+ super("");
+ }
+
+ @Override
+ public final List getSchemas() {
+ List result = new ArrayList();
+ result.addAll(getSchemas0());
+ return result;
+ }
+
+ private final List getSchemas0() {
+ return Arrays.asList(
+ TexeraDb.TEXERA_DB);
+ }
+}
diff --git a/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/Indexes.java b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/Indexes.java
new file mode 100644
index 00000000000..8ef0bd1480e
--- /dev/null
+++ b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/Indexes.java
@@ -0,0 +1,108 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package edu.uci.ics.texera.model.jooq.generated;
+
+
+import edu.uci.ics.texera.model.jooq.generated.tables.Dataset;
+import edu.uci.ics.texera.model.jooq.generated.tables.DatasetUserAccess;
+import edu.uci.ics.texera.model.jooq.generated.tables.DatasetVersion;
+import edu.uci.ics.texera.model.jooq.generated.tables.Project;
+import edu.uci.ics.texera.model.jooq.generated.tables.ProjectUserAccess;
+import edu.uci.ics.texera.model.jooq.generated.tables.PublicProject;
+import edu.uci.ics.texera.model.jooq.generated.tables.User;
+import edu.uci.ics.texera.model.jooq.generated.tables.UserConfig;
+import edu.uci.ics.texera.model.jooq.generated.tables.Workflow;
+import edu.uci.ics.texera.model.jooq.generated.tables.WorkflowExecutions;
+import edu.uci.ics.texera.model.jooq.generated.tables.WorkflowOfProject;
+import edu.uci.ics.texera.model.jooq.generated.tables.WorkflowOfUser;
+import edu.uci.ics.texera.model.jooq.generated.tables.WorkflowUserAccess;
+import edu.uci.ics.texera.model.jooq.generated.tables.WorkflowVersion;
+
+import org.jooq.Index;
+import org.jooq.OrderField;
+import org.jooq.impl.Internal;
+
+
+/**
+ * A class modelling indexes of tables of the texera_db schema.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class Indexes {
+
+ // -------------------------------------------------------------------------
+ // INDEX definitions
+ // -------------------------------------------------------------------------
+
+ public static final Index DATASET_IDX_DATASET_NAME_DESCRIPTION = Indexes0.DATASET_IDX_DATASET_NAME_DESCRIPTION;
+ public static final Index DATASET_OWNER_UID = Indexes0.DATASET_OWNER_UID;
+ public static final Index DATASET_PRIMARY = Indexes0.DATASET_PRIMARY;
+ public static final Index DATASET_USER_ACCESS_PRIMARY = Indexes0.DATASET_USER_ACCESS_PRIMARY;
+ public static final Index DATASET_USER_ACCESS_UID = Indexes0.DATASET_USER_ACCESS_UID;
+ public static final Index DATASET_VERSION_DID = Indexes0.DATASET_VERSION_DID;
+ public static final Index DATASET_VERSION_IDX_DATASET_VERSION_NAME = Indexes0.DATASET_VERSION_IDX_DATASET_VERSION_NAME;
+ public static final Index DATASET_VERSION_PRIMARY = Indexes0.DATASET_VERSION_PRIMARY;
+ public static final Index PROJECT_IDX_USER_PROJECT_NAME_DESCRIPTION = Indexes0.PROJECT_IDX_USER_PROJECT_NAME_DESCRIPTION;
+ public static final Index PROJECT_OWNER_ID = Indexes0.PROJECT_OWNER_ID;
+ public static final Index PROJECT_PRIMARY = Indexes0.PROJECT_PRIMARY;
+ public static final Index PROJECT_USER_ACCESS_PID = Indexes0.PROJECT_USER_ACCESS_PID;
+ public static final Index PROJECT_USER_ACCESS_PRIMARY = Indexes0.PROJECT_USER_ACCESS_PRIMARY;
+ public static final Index PUBLIC_PROJECT_PRIMARY = Indexes0.PUBLIC_PROJECT_PRIMARY;
+ public static final Index USER_EMAIL = Indexes0.USER_EMAIL;
+ public static final Index USER_GOOGLE_ID = Indexes0.USER_GOOGLE_ID;
+ public static final Index USER_IDX_USER_NAME = Indexes0.USER_IDX_USER_NAME;
+ public static final Index USER_PRIMARY = Indexes0.USER_PRIMARY;
+ public static final Index USER_CONFIG_PRIMARY = Indexes0.USER_CONFIG_PRIMARY;
+ public static final Index WORKFLOW_IDX_WORKFLOW_NAME_DESCRIPTION_CONTENT = Indexes0.WORKFLOW_IDX_WORKFLOW_NAME_DESCRIPTION_CONTENT;
+ public static final Index WORKFLOW_PRIMARY = Indexes0.WORKFLOW_PRIMARY;
+ public static final Index WORKFLOW_EXECUTIONS_PRIMARY = Indexes0.WORKFLOW_EXECUTIONS_PRIMARY;
+ public static final Index WORKFLOW_EXECUTIONS_UID = Indexes0.WORKFLOW_EXECUTIONS_UID;
+ public static final Index WORKFLOW_EXECUTIONS_VID = Indexes0.WORKFLOW_EXECUTIONS_VID;
+ public static final Index WORKFLOW_OF_PROJECT_PID = Indexes0.WORKFLOW_OF_PROJECT_PID;
+ public static final Index WORKFLOW_OF_PROJECT_PRIMARY = Indexes0.WORKFLOW_OF_PROJECT_PRIMARY;
+ public static final Index WORKFLOW_OF_USER_PRIMARY = Indexes0.WORKFLOW_OF_USER_PRIMARY;
+ public static final Index WORKFLOW_OF_USER_WID = Indexes0.WORKFLOW_OF_USER_WID;
+ public static final Index WORKFLOW_USER_ACCESS_PRIMARY = Indexes0.WORKFLOW_USER_ACCESS_PRIMARY;
+ public static final Index WORKFLOW_USER_ACCESS_WID = Indexes0.WORKFLOW_USER_ACCESS_WID;
+ public static final Index WORKFLOW_VERSION_PRIMARY = Indexes0.WORKFLOW_VERSION_PRIMARY;
+ public static final Index WORKFLOW_VERSION_WID = Indexes0.WORKFLOW_VERSION_WID;
+
+ // -------------------------------------------------------------------------
+ // [#1459] distribute members to avoid static initialisers > 64kb
+ // -------------------------------------------------------------------------
+
+ private static class Indexes0 {
+ public static Index DATASET_IDX_DATASET_NAME_DESCRIPTION = Internal.createIndex("idx_dataset_name_description", Dataset.DATASET, new OrderField[] { Dataset.DATASET.NAME, Dataset.DATASET.DESCRIPTION }, false);
+ public static Index DATASET_OWNER_UID = Internal.createIndex("owner_uid", Dataset.DATASET, new OrderField[] { Dataset.DATASET.OWNER_UID }, false);
+ public static Index DATASET_PRIMARY = Internal.createIndex("PRIMARY", Dataset.DATASET, new OrderField[] { Dataset.DATASET.DID }, true);
+ public static Index DATASET_USER_ACCESS_PRIMARY = Internal.createIndex("PRIMARY", DatasetUserAccess.DATASET_USER_ACCESS, new OrderField[] { DatasetUserAccess.DATASET_USER_ACCESS.DID, DatasetUserAccess.DATASET_USER_ACCESS.UID }, true);
+ public static Index DATASET_USER_ACCESS_UID = Internal.createIndex("uid", DatasetUserAccess.DATASET_USER_ACCESS, new OrderField[] { DatasetUserAccess.DATASET_USER_ACCESS.UID }, false);
+ public static Index DATASET_VERSION_DID = Internal.createIndex("did", DatasetVersion.DATASET_VERSION, new OrderField[] { DatasetVersion.DATASET_VERSION.DID }, false);
+ public static Index DATASET_VERSION_IDX_DATASET_VERSION_NAME = Internal.createIndex("idx_dataset_version_name", DatasetVersion.DATASET_VERSION, new OrderField[] { DatasetVersion.DATASET_VERSION.NAME }, false);
+ public static Index DATASET_VERSION_PRIMARY = Internal.createIndex("PRIMARY", DatasetVersion.DATASET_VERSION, new OrderField[] { DatasetVersion.DATASET_VERSION.DVID }, true);
+ public static Index PROJECT_IDX_USER_PROJECT_NAME_DESCRIPTION = Internal.createIndex("idx_user_project_name_description", Project.PROJECT, new OrderField[] { Project.PROJECT.NAME, Project.PROJECT.DESCRIPTION }, false);
+ public static Index PROJECT_OWNER_ID = Internal.createIndex("owner_id", Project.PROJECT, new OrderField[] { Project.PROJECT.OWNER_ID, Project.PROJECT.NAME }, true);
+ public static Index PROJECT_PRIMARY = Internal.createIndex("PRIMARY", Project.PROJECT, new OrderField[] { Project.PROJECT.PID }, true);
+ public static Index PROJECT_USER_ACCESS_PID = Internal.createIndex("pid", ProjectUserAccess.PROJECT_USER_ACCESS, new OrderField[] { ProjectUserAccess.PROJECT_USER_ACCESS.PID }, false);
+ public static Index PROJECT_USER_ACCESS_PRIMARY = Internal.createIndex("PRIMARY", ProjectUserAccess.PROJECT_USER_ACCESS, new OrderField[] { ProjectUserAccess.PROJECT_USER_ACCESS.UID, ProjectUserAccess.PROJECT_USER_ACCESS.PID }, true);
+ public static Index PUBLIC_PROJECT_PRIMARY = Internal.createIndex("PRIMARY", PublicProject.PUBLIC_PROJECT, new OrderField[] { PublicProject.PUBLIC_PROJECT.PID }, true);
+ public static Index USER_EMAIL = Internal.createIndex("email", User.USER, new OrderField[] { User.USER.EMAIL }, true);
+ public static Index USER_GOOGLE_ID = Internal.createIndex("google_id", User.USER, new OrderField[] { User.USER.GOOGLE_ID }, true);
+ public static Index USER_IDX_USER_NAME = Internal.createIndex("idx_user_name", User.USER, new OrderField[] { User.USER.NAME }, false);
+ public static Index USER_PRIMARY = Internal.createIndex("PRIMARY", User.USER, new OrderField[] { User.USER.UID }, true);
+ public static Index USER_CONFIG_PRIMARY = Internal.createIndex("PRIMARY", UserConfig.USER_CONFIG, new OrderField[] { UserConfig.USER_CONFIG.UID, UserConfig.USER_CONFIG.KEY }, true);
+ public static Index WORKFLOW_IDX_WORKFLOW_NAME_DESCRIPTION_CONTENT = Internal.createIndex("idx_workflow_name_description_content", Workflow.WORKFLOW, new OrderField[] { Workflow.WORKFLOW.NAME, Workflow.WORKFLOW.DESCRIPTION, Workflow.WORKFLOW.CONTENT }, false);
+ public static Index WORKFLOW_PRIMARY = Internal.createIndex("PRIMARY", Workflow.WORKFLOW, new OrderField[] { Workflow.WORKFLOW.WID }, true);
+ public static Index WORKFLOW_EXECUTIONS_PRIMARY = Internal.createIndex("PRIMARY", WorkflowExecutions.WORKFLOW_EXECUTIONS, new OrderField[] { WorkflowExecutions.WORKFLOW_EXECUTIONS.EID }, true);
+ public static Index WORKFLOW_EXECUTIONS_UID = Internal.createIndex("uid", WorkflowExecutions.WORKFLOW_EXECUTIONS, new OrderField[] { WorkflowExecutions.WORKFLOW_EXECUTIONS.UID }, false);
+ public static Index WORKFLOW_EXECUTIONS_VID = Internal.createIndex("vid", WorkflowExecutions.WORKFLOW_EXECUTIONS, new OrderField[] { WorkflowExecutions.WORKFLOW_EXECUTIONS.VID }, false);
+ public static Index WORKFLOW_OF_PROJECT_PID = Internal.createIndex("pid", WorkflowOfProject.WORKFLOW_OF_PROJECT, new OrderField[] { WorkflowOfProject.WORKFLOW_OF_PROJECT.PID }, false);
+ public static Index WORKFLOW_OF_PROJECT_PRIMARY = Internal.createIndex("PRIMARY", WorkflowOfProject.WORKFLOW_OF_PROJECT, new OrderField[] { WorkflowOfProject.WORKFLOW_OF_PROJECT.WID, WorkflowOfProject.WORKFLOW_OF_PROJECT.PID }, true);
+ public static Index WORKFLOW_OF_USER_PRIMARY = Internal.createIndex("PRIMARY", WorkflowOfUser.WORKFLOW_OF_USER, new OrderField[] { WorkflowOfUser.WORKFLOW_OF_USER.UID, WorkflowOfUser.WORKFLOW_OF_USER.WID }, true);
+ public static Index WORKFLOW_OF_USER_WID = Internal.createIndex("wid", WorkflowOfUser.WORKFLOW_OF_USER, new OrderField[] { WorkflowOfUser.WORKFLOW_OF_USER.WID }, false);
+ public static Index WORKFLOW_USER_ACCESS_PRIMARY = Internal.createIndex("PRIMARY", WorkflowUserAccess.WORKFLOW_USER_ACCESS, new OrderField[] { WorkflowUserAccess.WORKFLOW_USER_ACCESS.UID, WorkflowUserAccess.WORKFLOW_USER_ACCESS.WID }, true);
+ public static Index WORKFLOW_USER_ACCESS_WID = Internal.createIndex("wid", WorkflowUserAccess.WORKFLOW_USER_ACCESS, new OrderField[] { WorkflowUserAccess.WORKFLOW_USER_ACCESS.WID }, false);
+ public static Index WORKFLOW_VERSION_PRIMARY = Internal.createIndex("PRIMARY", WorkflowVersion.WORKFLOW_VERSION, new OrderField[] { WorkflowVersion.WORKFLOW_VERSION.VID }, true);
+ public static Index WORKFLOW_VERSION_WID = Internal.createIndex("wid", WorkflowVersion.WORKFLOW_VERSION, new OrderField[] { WorkflowVersion.WORKFLOW_VERSION.WID }, false);
+ }
+}
diff --git a/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/Keys.java b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/Keys.java
new file mode 100644
index 00000000000..0c3b5a4b661
--- /dev/null
+++ b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/Keys.java
@@ -0,0 +1,161 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package edu.uci.ics.texera.model.jooq.generated;
+
+
+import edu.uci.ics.texera.model.jooq.generated.tables.Dataset;
+import edu.uci.ics.texera.model.jooq.generated.tables.DatasetUserAccess;
+import edu.uci.ics.texera.model.jooq.generated.tables.DatasetVersion;
+import edu.uci.ics.texera.model.jooq.generated.tables.Project;
+import edu.uci.ics.texera.model.jooq.generated.tables.ProjectUserAccess;
+import edu.uci.ics.texera.model.jooq.generated.tables.PublicProject;
+import edu.uci.ics.texera.model.jooq.generated.tables.User;
+import edu.uci.ics.texera.model.jooq.generated.tables.UserConfig;
+import edu.uci.ics.texera.model.jooq.generated.tables.Workflow;
+import edu.uci.ics.texera.model.jooq.generated.tables.WorkflowExecutions;
+import edu.uci.ics.texera.model.jooq.generated.tables.WorkflowOfProject;
+import edu.uci.ics.texera.model.jooq.generated.tables.WorkflowOfUser;
+import edu.uci.ics.texera.model.jooq.generated.tables.WorkflowUserAccess;
+import edu.uci.ics.texera.model.jooq.generated.tables.WorkflowVersion;
+import edu.uci.ics.texera.model.jooq.generated.tables.records.DatasetRecord;
+import edu.uci.ics.texera.model.jooq.generated.tables.records.DatasetUserAccessRecord;
+import edu.uci.ics.texera.model.jooq.generated.tables.records.DatasetVersionRecord;
+import edu.uci.ics.texera.model.jooq.generated.tables.records.ProjectRecord;
+import edu.uci.ics.texera.model.jooq.generated.tables.records.ProjectUserAccessRecord;
+import edu.uci.ics.texera.model.jooq.generated.tables.records.PublicProjectRecord;
+import edu.uci.ics.texera.model.jooq.generated.tables.records.UserConfigRecord;
+import edu.uci.ics.texera.model.jooq.generated.tables.records.UserRecord;
+import edu.uci.ics.texera.model.jooq.generated.tables.records.WorkflowExecutionsRecord;
+import edu.uci.ics.texera.model.jooq.generated.tables.records.WorkflowOfProjectRecord;
+import edu.uci.ics.texera.model.jooq.generated.tables.records.WorkflowOfUserRecord;
+import edu.uci.ics.texera.model.jooq.generated.tables.records.WorkflowRecord;
+import edu.uci.ics.texera.model.jooq.generated.tables.records.WorkflowUserAccessRecord;
+import edu.uci.ics.texera.model.jooq.generated.tables.records.WorkflowVersionRecord;
+
+import org.jooq.ForeignKey;
+import org.jooq.Identity;
+import org.jooq.UniqueKey;
+import org.jooq.impl.Internal;
+import org.jooq.types.UInteger;
+
+
+/**
+ * A class modelling foreign key relationships and constraints of tables of
+ * the texera_db schema.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class Keys {
+
+ // -------------------------------------------------------------------------
+ // IDENTITY definitions
+ // -------------------------------------------------------------------------
+
+ public static final Identity IDENTITY_DATASET = Identities0.IDENTITY_DATASET;
+ public static final Identity IDENTITY_DATASET_VERSION = Identities0.IDENTITY_DATASET_VERSION;
+ public static final Identity IDENTITY_PROJECT = Identities0.IDENTITY_PROJECT;
+ public static final Identity IDENTITY_USER = Identities0.IDENTITY_USER;
+ public static final Identity IDENTITY_WORKFLOW = Identities0.IDENTITY_WORKFLOW;
+ public static final Identity IDENTITY_WORKFLOW_EXECUTIONS = Identities0.IDENTITY_WORKFLOW_EXECUTIONS;
+ public static final Identity IDENTITY_WORKFLOW_VERSION = Identities0.IDENTITY_WORKFLOW_VERSION;
+
+ // -------------------------------------------------------------------------
+ // UNIQUE and PRIMARY KEY definitions
+ // -------------------------------------------------------------------------
+
+ public static final UniqueKey KEY_DATASET_PRIMARY = UniqueKeys0.KEY_DATASET_PRIMARY;
+ public static final UniqueKey KEY_DATASET_USER_ACCESS_PRIMARY = UniqueKeys0.KEY_DATASET_USER_ACCESS_PRIMARY;
+ public static final UniqueKey KEY_DATASET_VERSION_PRIMARY = UniqueKeys0.KEY_DATASET_VERSION_PRIMARY;
+ public static final UniqueKey KEY_PROJECT_PRIMARY = UniqueKeys0.KEY_PROJECT_PRIMARY;
+ public static final UniqueKey KEY_PROJECT_OWNER_ID = UniqueKeys0.KEY_PROJECT_OWNER_ID;
+ public static final UniqueKey KEY_PROJECT_USER_ACCESS_PRIMARY = UniqueKeys0.KEY_PROJECT_USER_ACCESS_PRIMARY;
+ public static final UniqueKey KEY_PUBLIC_PROJECT_PRIMARY = UniqueKeys0.KEY_PUBLIC_PROJECT_PRIMARY;
+ public static final UniqueKey KEY_USER_PRIMARY = UniqueKeys0.KEY_USER_PRIMARY;
+ public static final UniqueKey KEY_USER_EMAIL = UniqueKeys0.KEY_USER_EMAIL;
+ public static final UniqueKey KEY_USER_GOOGLE_ID = UniqueKeys0.KEY_USER_GOOGLE_ID;
+ public static final UniqueKey KEY_USER_CONFIG_PRIMARY = UniqueKeys0.KEY_USER_CONFIG_PRIMARY;
+ public static final UniqueKey KEY_WORKFLOW_PRIMARY = UniqueKeys0.KEY_WORKFLOW_PRIMARY;
+ public static final UniqueKey KEY_WORKFLOW_EXECUTIONS_PRIMARY = UniqueKeys0.KEY_WORKFLOW_EXECUTIONS_PRIMARY;
+ public static final UniqueKey KEY_WORKFLOW_OF_PROJECT_PRIMARY = UniqueKeys0.KEY_WORKFLOW_OF_PROJECT_PRIMARY;
+ public static final UniqueKey KEY_WORKFLOW_OF_USER_PRIMARY = UniqueKeys0.KEY_WORKFLOW_OF_USER_PRIMARY;
+ public static final UniqueKey KEY_WORKFLOW_USER_ACCESS_PRIMARY = UniqueKeys0.KEY_WORKFLOW_USER_ACCESS_PRIMARY;
+ public static final UniqueKey KEY_WORKFLOW_VERSION_PRIMARY = UniqueKeys0.KEY_WORKFLOW_VERSION_PRIMARY;
+
+ // -------------------------------------------------------------------------
+ // FOREIGN KEY definitions
+ // -------------------------------------------------------------------------
+
+ public static final ForeignKey DATASET_IBFK_1 = ForeignKeys0.DATASET_IBFK_1;
+ public static final ForeignKey DATASET_USER_ACCESS_IBFK_1 = ForeignKeys0.DATASET_USER_ACCESS_IBFK_1;
+ public static final ForeignKey DATASET_USER_ACCESS_IBFK_2 = ForeignKeys0.DATASET_USER_ACCESS_IBFK_2;
+ public static final ForeignKey DATASET_VERSION_IBFK_1 = ForeignKeys0.DATASET_VERSION_IBFK_1;
+ public static final ForeignKey PROJECT_IBFK_1 = ForeignKeys0.PROJECT_IBFK_1;
+ public static final ForeignKey PROJECT_USER_ACCESS_IBFK_1 = ForeignKeys0.PROJECT_USER_ACCESS_IBFK_1;
+ public static final ForeignKey PROJECT_USER_ACCESS_IBFK_2 = ForeignKeys0.PROJECT_USER_ACCESS_IBFK_2;
+ public static final ForeignKey PUBLIC_PROJECT_IBFK_1 = ForeignKeys0.PUBLIC_PROJECT_IBFK_1;
+ public static final ForeignKey USER_CONFIG_IBFK_1 = ForeignKeys0.USER_CONFIG_IBFK_1;
+ public static final ForeignKey WORKFLOW_EXECUTIONS_IBFK_1 = ForeignKeys0.WORKFLOW_EXECUTIONS_IBFK_1;
+ public static final ForeignKey WORKFLOW_EXECUTIONS_IBFK_2 = ForeignKeys0.WORKFLOW_EXECUTIONS_IBFK_2;
+ public static final ForeignKey WORKFLOW_OF_PROJECT_IBFK_1 = ForeignKeys0.WORKFLOW_OF_PROJECT_IBFK_1;
+ public static final ForeignKey WORKFLOW_OF_PROJECT_IBFK_2 = ForeignKeys0.WORKFLOW_OF_PROJECT_IBFK_2;
+ public static final ForeignKey WORKFLOW_OF_USER_IBFK_1 = ForeignKeys0.WORKFLOW_OF_USER_IBFK_1;
+ public static final ForeignKey WORKFLOW_OF_USER_IBFK_2 = ForeignKeys0.WORKFLOW_OF_USER_IBFK_2;
+ public static final ForeignKey WORKFLOW_USER_ACCESS_IBFK_1 = ForeignKeys0.WORKFLOW_USER_ACCESS_IBFK_1;
+ public static final ForeignKey WORKFLOW_USER_ACCESS_IBFK_2 = ForeignKeys0.WORKFLOW_USER_ACCESS_IBFK_2;
+ public static final ForeignKey WORKFLOW_VERSION_IBFK_1 = ForeignKeys0.WORKFLOW_VERSION_IBFK_1;
+
+ // -------------------------------------------------------------------------
+ // [#1459] distribute members to avoid static initialisers > 64kb
+ // -------------------------------------------------------------------------
+
+ private static class Identities0 {
+ public static Identity IDENTITY_DATASET = Internal.createIdentity(Dataset.DATASET, Dataset.DATASET.DID);
+ public static Identity IDENTITY_DATASET_VERSION = Internal.createIdentity(DatasetVersion.DATASET_VERSION, DatasetVersion.DATASET_VERSION.DVID);
+ public static Identity IDENTITY_PROJECT = Internal.createIdentity(Project.PROJECT, Project.PROJECT.PID);
+ public static Identity IDENTITY_USER = Internal.createIdentity(User.USER, User.USER.UID);
+ public static Identity IDENTITY_WORKFLOW = Internal.createIdentity(Workflow.WORKFLOW, Workflow.WORKFLOW.WID);
+ public static Identity IDENTITY_WORKFLOW_EXECUTIONS = Internal.createIdentity(WorkflowExecutions.WORKFLOW_EXECUTIONS, WorkflowExecutions.WORKFLOW_EXECUTIONS.EID);
+ public static Identity IDENTITY_WORKFLOW_VERSION = Internal.createIdentity(WorkflowVersion.WORKFLOW_VERSION, WorkflowVersion.WORKFLOW_VERSION.VID);
+ }
+
+ private static class UniqueKeys0 {
+ public static final UniqueKey KEY_DATASET_PRIMARY = Internal.createUniqueKey(Dataset.DATASET, "KEY_dataset_PRIMARY", Dataset.DATASET.DID);
+ public static final UniqueKey KEY_DATASET_USER_ACCESS_PRIMARY = Internal.createUniqueKey(DatasetUserAccess.DATASET_USER_ACCESS, "KEY_dataset_user_access_PRIMARY", DatasetUserAccess.DATASET_USER_ACCESS.DID, DatasetUserAccess.DATASET_USER_ACCESS.UID);
+ public static final UniqueKey KEY_DATASET_VERSION_PRIMARY = Internal.createUniqueKey(DatasetVersion.DATASET_VERSION, "KEY_dataset_version_PRIMARY", DatasetVersion.DATASET_VERSION.DVID);
+ public static final UniqueKey KEY_PROJECT_PRIMARY = Internal.createUniqueKey(Project.PROJECT, "KEY_project_PRIMARY", Project.PROJECT.PID);
+ public static final UniqueKey KEY_PROJECT_OWNER_ID = Internal.createUniqueKey(Project.PROJECT, "KEY_project_owner_id", Project.PROJECT.OWNER_ID, Project.PROJECT.NAME);
+ public static final UniqueKey KEY_PROJECT_USER_ACCESS_PRIMARY = Internal.createUniqueKey(ProjectUserAccess.PROJECT_USER_ACCESS, "KEY_project_user_access_PRIMARY", ProjectUserAccess.PROJECT_USER_ACCESS.UID, ProjectUserAccess.PROJECT_USER_ACCESS.PID);
+ public static final UniqueKey KEY_PUBLIC_PROJECT_PRIMARY = Internal.createUniqueKey(PublicProject.PUBLIC_PROJECT, "KEY_public_project_PRIMARY", PublicProject.PUBLIC_PROJECT.PID);
+ public static final UniqueKey KEY_USER_PRIMARY = Internal.createUniqueKey(User.USER, "KEY_user_PRIMARY", User.USER.UID);
+ public static final UniqueKey KEY_USER_EMAIL = Internal.createUniqueKey(User.USER, "KEY_user_email", User.USER.EMAIL);
+ public static final UniqueKey KEY_USER_GOOGLE_ID = Internal.createUniqueKey(User.USER, "KEY_user_google_id", User.USER.GOOGLE_ID);
+ public static final UniqueKey KEY_USER_CONFIG_PRIMARY = Internal.createUniqueKey(UserConfig.USER_CONFIG, "KEY_user_config_PRIMARY", UserConfig.USER_CONFIG.UID, UserConfig.USER_CONFIG.KEY);
+ public static final UniqueKey KEY_WORKFLOW_PRIMARY = Internal.createUniqueKey(Workflow.WORKFLOW, "KEY_workflow_PRIMARY", Workflow.WORKFLOW.WID);
+ public static final UniqueKey KEY_WORKFLOW_EXECUTIONS_PRIMARY = Internal.createUniqueKey(WorkflowExecutions.WORKFLOW_EXECUTIONS, "KEY_workflow_executions_PRIMARY", WorkflowExecutions.WORKFLOW_EXECUTIONS.EID);
+ public static final UniqueKey KEY_WORKFLOW_OF_PROJECT_PRIMARY = Internal.createUniqueKey(WorkflowOfProject.WORKFLOW_OF_PROJECT, "KEY_workflow_of_project_PRIMARY", WorkflowOfProject.WORKFLOW_OF_PROJECT.WID, WorkflowOfProject.WORKFLOW_OF_PROJECT.PID);
+ public static final UniqueKey KEY_WORKFLOW_OF_USER_PRIMARY = Internal.createUniqueKey(WorkflowOfUser.WORKFLOW_OF_USER, "KEY_workflow_of_user_PRIMARY", WorkflowOfUser.WORKFLOW_OF_USER.UID, WorkflowOfUser.WORKFLOW_OF_USER.WID);
+ public static final UniqueKey KEY_WORKFLOW_USER_ACCESS_PRIMARY = Internal.createUniqueKey(WorkflowUserAccess.WORKFLOW_USER_ACCESS, "KEY_workflow_user_access_PRIMARY", WorkflowUserAccess.WORKFLOW_USER_ACCESS.UID, WorkflowUserAccess.WORKFLOW_USER_ACCESS.WID);
+ public static final UniqueKey KEY_WORKFLOW_VERSION_PRIMARY = Internal.createUniqueKey(WorkflowVersion.WORKFLOW_VERSION, "KEY_workflow_version_PRIMARY", WorkflowVersion.WORKFLOW_VERSION.VID);
+ }
+
+ private static class ForeignKeys0 {
+ public static final ForeignKey DATASET_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.model.jooq.generated.Keys.KEY_USER_PRIMARY, Dataset.DATASET, "dataset_ibfk_1", Dataset.DATASET.OWNER_UID);
+ public static final ForeignKey DATASET_USER_ACCESS_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.model.jooq.generated.Keys.KEY_DATASET_PRIMARY, DatasetUserAccess.DATASET_USER_ACCESS, "dataset_user_access_ibfk_1", DatasetUserAccess.DATASET_USER_ACCESS.DID);
+ public static final ForeignKey DATASET_USER_ACCESS_IBFK_2 = Internal.createForeignKey(edu.uci.ics.texera.model.jooq.generated.Keys.KEY_USER_PRIMARY, DatasetUserAccess.DATASET_USER_ACCESS, "dataset_user_access_ibfk_2", DatasetUserAccess.DATASET_USER_ACCESS.UID);
+ public static final ForeignKey DATASET_VERSION_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.model.jooq.generated.Keys.KEY_DATASET_PRIMARY, DatasetVersion.DATASET_VERSION, "dataset_version_ibfk_1", DatasetVersion.DATASET_VERSION.DID);
+ public static final ForeignKey PROJECT_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.model.jooq.generated.Keys.KEY_USER_PRIMARY, Project.PROJECT, "project_ibfk_1", Project.PROJECT.OWNER_ID);
+ public static final ForeignKey PROJECT_USER_ACCESS_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.model.jooq.generated.Keys.KEY_USER_PRIMARY, ProjectUserAccess.PROJECT_USER_ACCESS, "project_user_access_ibfk_1", ProjectUserAccess.PROJECT_USER_ACCESS.UID);
+ public static final ForeignKey PROJECT_USER_ACCESS_IBFK_2 = Internal.createForeignKey(edu.uci.ics.texera.model.jooq.generated.Keys.KEY_PROJECT_PRIMARY, ProjectUserAccess.PROJECT_USER_ACCESS, "project_user_access_ibfk_2", ProjectUserAccess.PROJECT_USER_ACCESS.PID);
+ public static final ForeignKey PUBLIC_PROJECT_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.model.jooq.generated.Keys.KEY_PROJECT_PRIMARY, PublicProject.PUBLIC_PROJECT, "public_project_ibfk_1", PublicProject.PUBLIC_PROJECT.PID);
+ public static final ForeignKey USER_CONFIG_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.model.jooq.generated.Keys.KEY_USER_PRIMARY, UserConfig.USER_CONFIG, "user_config_ibfk_1", UserConfig.USER_CONFIG.UID);
+ public static final ForeignKey WORKFLOW_EXECUTIONS_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.model.jooq.generated.Keys.KEY_WORKFLOW_VERSION_PRIMARY, WorkflowExecutions.WORKFLOW_EXECUTIONS, "workflow_executions_ibfk_1", WorkflowExecutions.WORKFLOW_EXECUTIONS.VID);
+ public static final ForeignKey WORKFLOW_EXECUTIONS_IBFK_2 = Internal.createForeignKey(edu.uci.ics.texera.model.jooq.generated.Keys.KEY_USER_PRIMARY, WorkflowExecutions.WORKFLOW_EXECUTIONS, "workflow_executions_ibfk_2", WorkflowExecutions.WORKFLOW_EXECUTIONS.UID);
+ public static final ForeignKey WORKFLOW_OF_PROJECT_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.model.jooq.generated.Keys.KEY_WORKFLOW_PRIMARY, WorkflowOfProject.WORKFLOW_OF_PROJECT, "workflow_of_project_ibfk_1", WorkflowOfProject.WORKFLOW_OF_PROJECT.WID);
+ public static final ForeignKey WORKFLOW_OF_PROJECT_IBFK_2 = Internal.createForeignKey(edu.uci.ics.texera.model.jooq.generated.Keys.KEY_PROJECT_PRIMARY, WorkflowOfProject.WORKFLOW_OF_PROJECT, "workflow_of_project_ibfk_2", WorkflowOfProject.WORKFLOW_OF_PROJECT.PID);
+ public static final ForeignKey WORKFLOW_OF_USER_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.model.jooq.generated.Keys.KEY_USER_PRIMARY, WorkflowOfUser.WORKFLOW_OF_USER, "workflow_of_user_ibfk_1", WorkflowOfUser.WORKFLOW_OF_USER.UID);
+ public static final ForeignKey WORKFLOW_OF_USER_IBFK_2 = Internal.createForeignKey(edu.uci.ics.texera.model.jooq.generated.Keys.KEY_WORKFLOW_PRIMARY, WorkflowOfUser.WORKFLOW_OF_USER, "workflow_of_user_ibfk_2", WorkflowOfUser.WORKFLOW_OF_USER.WID);
+ public static final ForeignKey WORKFLOW_USER_ACCESS_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.model.jooq.generated.Keys.KEY_USER_PRIMARY, WorkflowUserAccess.WORKFLOW_USER_ACCESS, "workflow_user_access_ibfk_1", WorkflowUserAccess.WORKFLOW_USER_ACCESS.UID);
+ public static final ForeignKey WORKFLOW_USER_ACCESS_IBFK_2 = Internal.createForeignKey(edu.uci.ics.texera.model.jooq.generated.Keys.KEY_WORKFLOW_PRIMARY, WorkflowUserAccess.WORKFLOW_USER_ACCESS, "workflow_user_access_ibfk_2", WorkflowUserAccess.WORKFLOW_USER_ACCESS.WID);
+ public static final ForeignKey WORKFLOW_VERSION_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.model.jooq.generated.Keys.KEY_WORKFLOW_PRIMARY, WorkflowVersion.WORKFLOW_VERSION, "workflow_version_ibfk_1", WorkflowVersion.WORKFLOW_VERSION.WID);
+ }
+}
diff --git a/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/Tables.java b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/Tables.java
new file mode 100644
index 00000000000..0be73f40517
--- /dev/null
+++ b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/Tables.java
@@ -0,0 +1,98 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package edu.uci.ics.texera.model.jooq.generated;
+
+
+import edu.uci.ics.texera.model.jooq.generated.tables.Dataset;
+import edu.uci.ics.texera.model.jooq.generated.tables.DatasetUserAccess;
+import edu.uci.ics.texera.model.jooq.generated.tables.DatasetVersion;
+import edu.uci.ics.texera.model.jooq.generated.tables.Project;
+import edu.uci.ics.texera.model.jooq.generated.tables.ProjectUserAccess;
+import edu.uci.ics.texera.model.jooq.generated.tables.PublicProject;
+import edu.uci.ics.texera.model.jooq.generated.tables.User;
+import edu.uci.ics.texera.model.jooq.generated.tables.UserConfig;
+import edu.uci.ics.texera.model.jooq.generated.tables.Workflow;
+import edu.uci.ics.texera.model.jooq.generated.tables.WorkflowExecutions;
+import edu.uci.ics.texera.model.jooq.generated.tables.WorkflowOfProject;
+import edu.uci.ics.texera.model.jooq.generated.tables.WorkflowOfUser;
+import edu.uci.ics.texera.model.jooq.generated.tables.WorkflowUserAccess;
+import edu.uci.ics.texera.model.jooq.generated.tables.WorkflowVersion;
+
+
+/**
+ * Convenience access to all tables in texera_db
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class Tables {
+
+ /**
+ * The table texera_db.dataset.
+ */
+ public static final Dataset DATASET = Dataset.DATASET;
+
+ /**
+ * The table texera_db.dataset_user_access.
+ */
+ public static final DatasetUserAccess DATASET_USER_ACCESS = DatasetUserAccess.DATASET_USER_ACCESS;
+
+ /**
+ * The table texera_db.dataset_version.
+ */
+ public static final DatasetVersion DATASET_VERSION = DatasetVersion.DATASET_VERSION;
+
+ /**
+ * The table texera_db.project.
+ */
+ public static final Project PROJECT = Project.PROJECT;
+
+ /**
+ * The table texera_db.project_user_access.
+ */
+ public static final ProjectUserAccess PROJECT_USER_ACCESS = ProjectUserAccess.PROJECT_USER_ACCESS;
+
+ /**
+ * The table texera_db.public_project.
+ */
+ public static final PublicProject PUBLIC_PROJECT = PublicProject.PUBLIC_PROJECT;
+
+ /**
+ * The table texera_db.user.
+ */
+ public static final User USER = User.USER;
+
+ /**
+ * The table texera_db.user_config.
+ */
+ public static final UserConfig USER_CONFIG = UserConfig.USER_CONFIG;
+
+ /**
+ * The table texera_db.workflow.
+ */
+ public static final Workflow WORKFLOW = Workflow.WORKFLOW;
+
+ /**
+ * The table texera_db.workflow_executions.
+ */
+ public static final WorkflowExecutions WORKFLOW_EXECUTIONS = WorkflowExecutions.WORKFLOW_EXECUTIONS;
+
+ /**
+ * The table texera_db.workflow_of_project.
+ */
+ public static final WorkflowOfProject WORKFLOW_OF_PROJECT = WorkflowOfProject.WORKFLOW_OF_PROJECT;
+
+ /**
+ * The table texera_db.workflow_of_user.
+ */
+ public static final WorkflowOfUser WORKFLOW_OF_USER = WorkflowOfUser.WORKFLOW_OF_USER;
+
+ /**
+ * The table texera_db.workflow_user_access.
+ */
+ public static final WorkflowUserAccess WORKFLOW_USER_ACCESS = WorkflowUserAccess.WORKFLOW_USER_ACCESS;
+
+ /**
+ * The table texera_db.workflow_version.
+ */
+ public static final WorkflowVersion WORKFLOW_VERSION = WorkflowVersion.WORKFLOW_VERSION;
+}
diff --git a/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/TexeraDb.java b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/TexeraDb.java
new file mode 100644
index 00000000000..40224dd2e2e
--- /dev/null
+++ b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/TexeraDb.java
@@ -0,0 +1,151 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package edu.uci.ics.texera.model.jooq.generated;
+
+
+import edu.uci.ics.texera.model.jooq.generated.tables.Dataset;
+import edu.uci.ics.texera.model.jooq.generated.tables.DatasetUserAccess;
+import edu.uci.ics.texera.model.jooq.generated.tables.DatasetVersion;
+import edu.uci.ics.texera.model.jooq.generated.tables.Project;
+import edu.uci.ics.texera.model.jooq.generated.tables.ProjectUserAccess;
+import edu.uci.ics.texera.model.jooq.generated.tables.PublicProject;
+import edu.uci.ics.texera.model.jooq.generated.tables.User;
+import edu.uci.ics.texera.model.jooq.generated.tables.UserConfig;
+import edu.uci.ics.texera.model.jooq.generated.tables.Workflow;
+import edu.uci.ics.texera.model.jooq.generated.tables.WorkflowExecutions;
+import edu.uci.ics.texera.model.jooq.generated.tables.WorkflowOfProject;
+import edu.uci.ics.texera.model.jooq.generated.tables.WorkflowOfUser;
+import edu.uci.ics.texera.model.jooq.generated.tables.WorkflowUserAccess;
+import edu.uci.ics.texera.model.jooq.generated.tables.WorkflowVersion;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.jooq.Catalog;
+import org.jooq.Table;
+import org.jooq.impl.SchemaImpl;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class TexeraDb extends SchemaImpl {
+
+ private static final long serialVersionUID = -466208877;
+
+ /**
+ * The reference instance of texera_db
+ */
+ public static final TexeraDb TEXERA_DB = new TexeraDb();
+
+ /**
+ * The table texera_db.dataset.
+ */
+ public final Dataset DATASET = edu.uci.ics.texera.model.jooq.generated.tables.Dataset.DATASET;
+
+ /**
+ * The table texera_db.dataset_user_access.
+ */
+ public final DatasetUserAccess DATASET_USER_ACCESS = edu.uci.ics.texera.model.jooq.generated.tables.DatasetUserAccess.DATASET_USER_ACCESS;
+
+ /**
+ * The table texera_db.dataset_version.
+ */
+ public final DatasetVersion DATASET_VERSION = edu.uci.ics.texera.model.jooq.generated.tables.DatasetVersion.DATASET_VERSION;
+
+ /**
+ * The table texera_db.project.
+ */
+ public final Project PROJECT = edu.uci.ics.texera.model.jooq.generated.tables.Project.PROJECT;
+
+ /**
+ * The table texera_db.project_user_access.
+ */
+ public final ProjectUserAccess PROJECT_USER_ACCESS = edu.uci.ics.texera.model.jooq.generated.tables.ProjectUserAccess.PROJECT_USER_ACCESS;
+
+ /**
+ * The table texera_db.public_project.
+ */
+ public final PublicProject PUBLIC_PROJECT = edu.uci.ics.texera.model.jooq.generated.tables.PublicProject.PUBLIC_PROJECT;
+
+ /**
+ * The table texera_db.user.
+ */
+ public final User USER = edu.uci.ics.texera.model.jooq.generated.tables.User.USER;
+
+ /**
+ * The table texera_db.user_config.
+ */
+ public final UserConfig USER_CONFIG = edu.uci.ics.texera.model.jooq.generated.tables.UserConfig.USER_CONFIG;
+
+ /**
+ * The table texera_db.workflow.
+ */
+ public final Workflow WORKFLOW = edu.uci.ics.texera.model.jooq.generated.tables.Workflow.WORKFLOW;
+
+ /**
+ * The table texera_db.workflow_executions.
+ */
+ public final WorkflowExecutions WORKFLOW_EXECUTIONS = edu.uci.ics.texera.model.jooq.generated.tables.WorkflowExecutions.WORKFLOW_EXECUTIONS;
+
+ /**
+ * The table texera_db.workflow_of_project.
+ */
+ public final WorkflowOfProject WORKFLOW_OF_PROJECT = edu.uci.ics.texera.model.jooq.generated.tables.WorkflowOfProject.WORKFLOW_OF_PROJECT;
+
+ /**
+ * The table texera_db.workflow_of_user.
+ */
+ public final WorkflowOfUser WORKFLOW_OF_USER = edu.uci.ics.texera.model.jooq.generated.tables.WorkflowOfUser.WORKFLOW_OF_USER;
+
+ /**
+ * The table texera_db.workflow_user_access.
+ */
+ public final WorkflowUserAccess WORKFLOW_USER_ACCESS = edu.uci.ics.texera.model.jooq.generated.tables.WorkflowUserAccess.WORKFLOW_USER_ACCESS;
+
+ /**
+ * The table texera_db.workflow_version.
+ */
+ public final WorkflowVersion WORKFLOW_VERSION = edu.uci.ics.texera.model.jooq.generated.tables.WorkflowVersion.WORKFLOW_VERSION;
+
+ /**
+ * No further instances allowed
+ */
+ private TexeraDb() {
+ super("texera_db", null);
+ }
+
+
+ @Override
+ public Catalog getCatalog() {
+ return DefaultCatalog.DEFAULT_CATALOG;
+ }
+
+ @Override
+ public final List> getTables() {
+ List result = new ArrayList();
+ result.addAll(getTables0());
+ return result;
+ }
+
+ private final List> getTables0() {
+ return Arrays.>asList(
+ Dataset.DATASET,
+ DatasetUserAccess.DATASET_USER_ACCESS,
+ DatasetVersion.DATASET_VERSION,
+ Project.PROJECT,
+ ProjectUserAccess.PROJECT_USER_ACCESS,
+ PublicProject.PUBLIC_PROJECT,
+ User.USER,
+ UserConfig.USER_CONFIG,
+ Workflow.WORKFLOW,
+ WorkflowExecutions.WORKFLOW_EXECUTIONS,
+ WorkflowOfProject.WORKFLOW_OF_PROJECT,
+ WorkflowOfUser.WORKFLOW_OF_USER,
+ WorkflowUserAccess.WORKFLOW_USER_ACCESS,
+ WorkflowVersion.WORKFLOW_VERSION);
+ }
+}
diff --git a/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/enums/DatasetUserAccessPrivilege.java b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/enums/DatasetUserAccessPrivilege.java
new file mode 100644
index 00000000000..bf2cc5ec62b
--- /dev/null
+++ b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/enums/DatasetUserAccessPrivilege.java
@@ -0,0 +1,49 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package edu.uci.ics.texera.model.jooq.generated.enums;
+
+
+import org.jooq.Catalog;
+import org.jooq.EnumType;
+import org.jooq.Schema;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public enum DatasetUserAccessPrivilege implements EnumType {
+
+ NONE("NONE"),
+
+ READ("READ"),
+
+ WRITE("WRITE");
+
+ private final String literal;
+
+ private DatasetUserAccessPrivilege(String literal) {
+ this.literal = literal;
+ }
+
+ @Override
+ public Catalog getCatalog() {
+ return null;
+ }
+
+ @Override
+ public Schema getSchema() {
+ return null;
+ }
+
+ @Override
+ public String getName() {
+ return "dataset_user_access_privilege";
+ }
+
+ @Override
+ public String getLiteral() {
+ return literal;
+ }
+}
diff --git a/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/enums/ProjectUserAccessPrivilege.java b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/enums/ProjectUserAccessPrivilege.java
new file mode 100644
index 00000000000..543b2300e47
--- /dev/null
+++ b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/enums/ProjectUserAccessPrivilege.java
@@ -0,0 +1,49 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package edu.uci.ics.texera.model.jooq.generated.enums;
+
+
+import org.jooq.Catalog;
+import org.jooq.EnumType;
+import org.jooq.Schema;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public enum ProjectUserAccessPrivilege implements EnumType {
+
+ NONE("NONE"),
+
+ READ("READ"),
+
+ WRITE("WRITE");
+
+ private final String literal;
+
+ private ProjectUserAccessPrivilege(String literal) {
+ this.literal = literal;
+ }
+
+ @Override
+ public Catalog getCatalog() {
+ return null;
+ }
+
+ @Override
+ public Schema getSchema() {
+ return null;
+ }
+
+ @Override
+ public String getName() {
+ return "project_user_access_privilege";
+ }
+
+ @Override
+ public String getLiteral() {
+ return literal;
+ }
+}
diff --git a/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/enums/UserRole.java b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/enums/UserRole.java
new file mode 100644
index 00000000000..ac604d41df3
--- /dev/null
+++ b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/enums/UserRole.java
@@ -0,0 +1,51 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package edu.uci.ics.texera.model.jooq.generated.enums;
+
+
+import org.jooq.Catalog;
+import org.jooq.EnumType;
+import org.jooq.Schema;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public enum UserRole implements EnumType {
+
+ INACTIVE("INACTIVE"),
+
+ RESTRICTED("RESTRICTED"),
+
+ REGULAR("REGULAR"),
+
+ ADMIN("ADMIN");
+
+ private final String literal;
+
+ private UserRole(String literal) {
+ this.literal = literal;
+ }
+
+ @Override
+ public Catalog getCatalog() {
+ return null;
+ }
+
+ @Override
+ public Schema getSchema() {
+ return null;
+ }
+
+ @Override
+ public String getName() {
+ return "user_role";
+ }
+
+ @Override
+ public String getLiteral() {
+ return literal;
+ }
+}
diff --git a/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/enums/WorkflowUserAccessPrivilege.java b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/enums/WorkflowUserAccessPrivilege.java
new file mode 100644
index 00000000000..dda9365e0d5
--- /dev/null
+++ b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/enums/WorkflowUserAccessPrivilege.java
@@ -0,0 +1,49 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package edu.uci.ics.texera.model.jooq.generated.enums;
+
+
+import org.jooq.Catalog;
+import org.jooq.EnumType;
+import org.jooq.Schema;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public enum WorkflowUserAccessPrivilege implements EnumType {
+
+ NONE("NONE"),
+
+ READ("READ"),
+
+ WRITE("WRITE");
+
+ private final String literal;
+
+ private WorkflowUserAccessPrivilege(String literal) {
+ this.literal = literal;
+ }
+
+ @Override
+ public Catalog getCatalog() {
+ return null;
+ }
+
+ @Override
+ public Schema getSchema() {
+ return null;
+ }
+
+ @Override
+ public String getName() {
+ return "workflow_user_access_privilege";
+ }
+
+ @Override
+ public String getLiteral() {
+ return literal;
+ }
+}
diff --git a/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/Dataset.java b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/Dataset.java
new file mode 100644
index 00000000000..1b8029be7f6
--- /dev/null
+++ b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/Dataset.java
@@ -0,0 +1,184 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package edu.uci.ics.texera.model.jooq.generated.tables;
+
+
+import edu.uci.ics.texera.model.jooq.generated.Indexes;
+import edu.uci.ics.texera.model.jooq.generated.Keys;
+import edu.uci.ics.texera.model.jooq.generated.TexeraDb;
+import edu.uci.ics.texera.model.jooq.generated.tables.records.DatasetRecord;
+
+import java.sql.Timestamp;
+import java.util.Arrays;
+import java.util.List;
+
+import org.jooq.Field;
+import org.jooq.ForeignKey;
+import org.jooq.Identity;
+import org.jooq.Index;
+import org.jooq.Name;
+import org.jooq.Record;
+import org.jooq.Row6;
+import org.jooq.Schema;
+import org.jooq.Table;
+import org.jooq.TableField;
+import org.jooq.UniqueKey;
+import org.jooq.impl.DSL;
+import org.jooq.impl.TableImpl;
+import org.jooq.types.UInteger;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class Dataset extends TableImpl {
+
+ private static final long serialVersionUID = -1671458881;
+
+ /**
+ * The reference instance of texera_db.dataset
+ */
+ public static final Dataset DATASET = new Dataset();
+
+ /**
+ * The class holding records for this type
+ */
+ @Override
+ public Class getRecordType() {
+ return DatasetRecord.class;
+ }
+
+ /**
+ * The column texera_db.dataset.did.
+ */
+ public final TableField DID = createField(DSL.name("did"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false).identity(true), this, "");
+
+ /**
+ * The column texera_db.dataset.owner_uid.
+ */
+ public final TableField OWNER_UID = createField(DSL.name("owner_uid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, "");
+
+ /**
+ * The column texera_db.dataset.name.
+ */
+ public final TableField NAME = createField(DSL.name("name"), org.jooq.impl.SQLDataType.VARCHAR(128).nullable(false), this, "");
+
+ /**
+ * The column texera_db.dataset.is_public.
+ */
+ public final TableField IS_PUBLIC = createField(DSL.name("is_public"), org.jooq.impl.SQLDataType.TINYINT.nullable(false).defaultValue(org.jooq.impl.DSL.inline("1", org.jooq.impl.SQLDataType.TINYINT)), this, "");
+
+ /**
+ * The column texera_db.dataset.description.
+ */
+ public final TableField DESCRIPTION = createField(DSL.name("description"), org.jooq.impl.SQLDataType.VARCHAR(512).nullable(false), this, "");
+
+ /**
+ * The column texera_db.dataset.creation_time.
+ */
+ public final TableField CREATION_TIME = createField(DSL.name("creation_time"), org.jooq.impl.SQLDataType.TIMESTAMP.nullable(false).defaultValue(org.jooq.impl.DSL.field("CURRENT_TIMESTAMP", org.jooq.impl.SQLDataType.TIMESTAMP)), this, "");
+
+ /**
+ * Create a texera_db.dataset table reference
+ */
+ public Dataset() {
+ this(DSL.name("dataset"), null);
+ }
+
+ /**
+ * Create an aliased texera_db.dataset table reference
+ */
+ public Dataset(String alias) {
+ this(DSL.name(alias), DATASET);
+ }
+
+ /**
+ * Create an aliased texera_db.dataset table reference
+ */
+ public Dataset(Name alias) {
+ this(alias, DATASET);
+ }
+
+ private Dataset(Name alias, Table aliased) {
+ this(alias, aliased, null);
+ }
+
+ private Dataset(Name alias, Table aliased, Field>[] parameters) {
+ super(alias, null, aliased, parameters, DSL.comment(""));
+ }
+
+ public Dataset(Table child, ForeignKey key) {
+ super(child, key, DATASET);
+ }
+
+ @Override
+ public Schema getSchema() {
+ return TexeraDb.TEXERA_DB;
+ }
+
+ @Override
+ public List getIndexes() {
+ return Arrays.asList(Indexes.DATASET_IDX_DATASET_NAME_DESCRIPTION, Indexes.DATASET_OWNER_UID, Indexes.DATASET_PRIMARY);
+ }
+
+ @Override
+ public Identity getIdentity() {
+ return Keys.IDENTITY_DATASET;
+ }
+
+ @Override
+ public UniqueKey getPrimaryKey() {
+ return Keys.KEY_DATASET_PRIMARY;
+ }
+
+ @Override
+ public List> getKeys() {
+ return Arrays.>asList(Keys.KEY_DATASET_PRIMARY);
+ }
+
+ @Override
+ public List> getReferences() {
+ return Arrays.>asList(Keys.DATASET_IBFK_1);
+ }
+
+ public User user() {
+ return new User(this, Keys.DATASET_IBFK_1);
+ }
+
+ @Override
+ public Dataset as(String alias) {
+ return new Dataset(DSL.name(alias), this);
+ }
+
+ @Override
+ public Dataset as(Name alias) {
+ return new Dataset(alias, this);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public Dataset rename(String name) {
+ return new Dataset(DSL.name(name), null);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public Dataset rename(Name name) {
+ return new Dataset(name, null);
+ }
+
+ // -------------------------------------------------------------------------
+ // Row6 type methods
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Row6 fieldsRow() {
+ return (Row6) super.fieldsRow();
+ }
+}
diff --git a/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/DatasetUserAccess.java b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/DatasetUserAccess.java
new file mode 100644
index 00000000000..2aebd6d2c54
--- /dev/null
+++ b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/DatasetUserAccess.java
@@ -0,0 +1,167 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package edu.uci.ics.texera.model.jooq.generated.tables;
+
+
+import edu.uci.ics.texera.model.jooq.generated.Indexes;
+import edu.uci.ics.texera.model.jooq.generated.Keys;
+import edu.uci.ics.texera.model.jooq.generated.TexeraDb;
+import edu.uci.ics.texera.model.jooq.generated.enums.DatasetUserAccessPrivilege;
+import edu.uci.ics.texera.model.jooq.generated.tables.records.DatasetUserAccessRecord;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.jooq.Field;
+import org.jooq.ForeignKey;
+import org.jooq.Index;
+import org.jooq.Name;
+import org.jooq.Record;
+import org.jooq.Row3;
+import org.jooq.Schema;
+import org.jooq.Table;
+import org.jooq.TableField;
+import org.jooq.UniqueKey;
+import org.jooq.impl.DSL;
+import org.jooq.impl.TableImpl;
+import org.jooq.types.UInteger;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class DatasetUserAccess extends TableImpl {
+
+ private static final long serialVersionUID = -345038433;
+
+ /**
+ * The reference instance of texera_db.dataset_user_access
+ */
+ public static final DatasetUserAccess DATASET_USER_ACCESS = new DatasetUserAccess();
+
+ /**
+ * The class holding records for this type
+ */
+ @Override
+ public Class getRecordType() {
+ return DatasetUserAccessRecord.class;
+ }
+
+ /**
+ * The column texera_db.dataset_user_access.did.
+ */
+ public final TableField DID = createField(DSL.name("did"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, "");
+
+ /**
+ * The column texera_db.dataset_user_access.uid.
+ */
+ public final TableField UID = createField(DSL.name("uid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, "");
+
+ /**
+ * The column texera_db.dataset_user_access.privilege.
+ */
+ public final TableField PRIVILEGE = createField(DSL.name("privilege"), org.jooq.impl.SQLDataType.VARCHAR(5).nullable(false).defaultValue(org.jooq.impl.DSL.inline("NONE", org.jooq.impl.SQLDataType.VARCHAR)).asEnumDataType(edu.uci.ics.texera.model.jooq.generated.enums.DatasetUserAccessPrivilege.class), this, "");
+
+ /**
+ * Create a texera_db.dataset_user_access table reference
+ */
+ public DatasetUserAccess() {
+ this(DSL.name("dataset_user_access"), null);
+ }
+
+ /**
+ * Create an aliased texera_db.dataset_user_access table reference
+ */
+ public DatasetUserAccess(String alias) {
+ this(DSL.name(alias), DATASET_USER_ACCESS);
+ }
+
+ /**
+ * Create an aliased texera_db.dataset_user_access table reference
+ */
+ public DatasetUserAccess(Name alias) {
+ this(alias, DATASET_USER_ACCESS);
+ }
+
+ private DatasetUserAccess(Name alias, Table aliased) {
+ this(alias, aliased, null);
+ }
+
+ private DatasetUserAccess(Name alias, Table aliased, Field>[] parameters) {
+ super(alias, null, aliased, parameters, DSL.comment(""));
+ }
+
+ public DatasetUserAccess(Table child, ForeignKey key) {
+ super(child, key, DATASET_USER_ACCESS);
+ }
+
+ @Override
+ public Schema getSchema() {
+ return TexeraDb.TEXERA_DB;
+ }
+
+ @Override
+ public List getIndexes() {
+ return Arrays.asList(Indexes.DATASET_USER_ACCESS_PRIMARY, Indexes.DATASET_USER_ACCESS_UID);
+ }
+
+ @Override
+ public UniqueKey getPrimaryKey() {
+ return Keys.KEY_DATASET_USER_ACCESS_PRIMARY;
+ }
+
+ @Override
+ public List> getKeys() {
+ return Arrays.>asList(Keys.KEY_DATASET_USER_ACCESS_PRIMARY);
+ }
+
+ @Override
+ public List> getReferences() {
+ return Arrays.>asList(Keys.DATASET_USER_ACCESS_IBFK_1, Keys.DATASET_USER_ACCESS_IBFK_2);
+ }
+
+ public Dataset dataset() {
+ return new Dataset(this, Keys.DATASET_USER_ACCESS_IBFK_1);
+ }
+
+ public User user() {
+ return new User(this, Keys.DATASET_USER_ACCESS_IBFK_2);
+ }
+
+ @Override
+ public DatasetUserAccess as(String alias) {
+ return new DatasetUserAccess(DSL.name(alias), this);
+ }
+
+ @Override
+ public DatasetUserAccess as(Name alias) {
+ return new DatasetUserAccess(alias, this);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public DatasetUserAccess rename(String name) {
+ return new DatasetUserAccess(DSL.name(name), null);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public DatasetUserAccess rename(Name name) {
+ return new DatasetUserAccess(name, null);
+ }
+
+ // -------------------------------------------------------------------------
+ // Row3 type methods
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Row3 fieldsRow() {
+ return (Row3) super.fieldsRow();
+ }
+}
diff --git a/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/DatasetVersion.java b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/DatasetVersion.java
new file mode 100644
index 00000000000..ceed870a617
--- /dev/null
+++ b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/DatasetVersion.java
@@ -0,0 +1,184 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package edu.uci.ics.texera.model.jooq.generated.tables;
+
+
+import edu.uci.ics.texera.model.jooq.generated.Indexes;
+import edu.uci.ics.texera.model.jooq.generated.Keys;
+import edu.uci.ics.texera.model.jooq.generated.TexeraDb;
+import edu.uci.ics.texera.model.jooq.generated.tables.records.DatasetVersionRecord;
+
+import java.sql.Timestamp;
+import java.util.Arrays;
+import java.util.List;
+
+import org.jooq.Field;
+import org.jooq.ForeignKey;
+import org.jooq.Identity;
+import org.jooq.Index;
+import org.jooq.Name;
+import org.jooq.Record;
+import org.jooq.Row6;
+import org.jooq.Schema;
+import org.jooq.Table;
+import org.jooq.TableField;
+import org.jooq.UniqueKey;
+import org.jooq.impl.DSL;
+import org.jooq.impl.TableImpl;
+import org.jooq.types.UInteger;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class DatasetVersion extends TableImpl {
+
+ private static final long serialVersionUID = 1838843209;
+
+ /**
+ * The reference instance of texera_db.dataset_version
+ */
+ public static final DatasetVersion DATASET_VERSION = new DatasetVersion();
+
+ /**
+ * The class holding records for this type
+ */
+ @Override
+ public Class getRecordType() {
+ return DatasetVersionRecord.class;
+ }
+
+ /**
+ * The column texera_db.dataset_version.dvid.
+ */
+ public final TableField DVID = createField(DSL.name("dvid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false).identity(true), this, "");
+
+ /**
+ * The column texera_db.dataset_version.did.
+ */
+ public final TableField DID = createField(DSL.name("did"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, "");
+
+ /**
+ * The column texera_db.dataset_version.creator_uid.
+ */
+ public final TableField CREATOR_UID = createField(DSL.name("creator_uid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, "");
+
+ /**
+ * The column texera_db.dataset_version.name.
+ */
+ public final TableField NAME = createField(DSL.name("name"), org.jooq.impl.SQLDataType.VARCHAR(128).nullable(false), this, "");
+
+ /**
+ * The column texera_db.dataset_version.version_hash.
+ */
+ public final TableField VERSION_HASH = createField(DSL.name("version_hash"), org.jooq.impl.SQLDataType.VARCHAR(64).nullable(false), this, "");
+
+ /**
+ * The column texera_db.dataset_version.creation_time.
+ */
+ public final TableField CREATION_TIME = createField(DSL.name("creation_time"), org.jooq.impl.SQLDataType.TIMESTAMP.nullable(false).defaultValue(org.jooq.impl.DSL.field("CURRENT_TIMESTAMP", org.jooq.impl.SQLDataType.TIMESTAMP)), this, "");
+
+ /**
+ * Create a texera_db.dataset_version table reference
+ */
+ public DatasetVersion() {
+ this(DSL.name("dataset_version"), null);
+ }
+
+ /**
+ * Create an aliased texera_db.dataset_version table reference
+ */
+ public DatasetVersion(String alias) {
+ this(DSL.name(alias), DATASET_VERSION);
+ }
+
+ /**
+ * Create an aliased texera_db.dataset_version table reference
+ */
+ public DatasetVersion(Name alias) {
+ this(alias, DATASET_VERSION);
+ }
+
+ private DatasetVersion(Name alias, Table aliased) {
+ this(alias, aliased, null);
+ }
+
+ private DatasetVersion(Name alias, Table aliased, Field>[] parameters) {
+ super(alias, null, aliased, parameters, DSL.comment(""));
+ }
+
+ public DatasetVersion(Table child, ForeignKey key) {
+ super(child, key, DATASET_VERSION);
+ }
+
+ @Override
+ public Schema getSchema() {
+ return TexeraDb.TEXERA_DB;
+ }
+
+ @Override
+ public List getIndexes() {
+ return Arrays.asList(Indexes.DATASET_VERSION_DID, Indexes.DATASET_VERSION_IDX_DATASET_VERSION_NAME, Indexes.DATASET_VERSION_PRIMARY);
+ }
+
+ @Override
+ public Identity getIdentity() {
+ return Keys.IDENTITY_DATASET_VERSION;
+ }
+
+ @Override
+ public UniqueKey getPrimaryKey() {
+ return Keys.KEY_DATASET_VERSION_PRIMARY;
+ }
+
+ @Override
+ public List> getKeys() {
+ return Arrays.>asList(Keys.KEY_DATASET_VERSION_PRIMARY);
+ }
+
+ @Override
+ public List> getReferences() {
+ return Arrays.>asList(Keys.DATASET_VERSION_IBFK_1);
+ }
+
+ public Dataset dataset() {
+ return new Dataset(this, Keys.DATASET_VERSION_IBFK_1);
+ }
+
+ @Override
+ public DatasetVersion as(String alias) {
+ return new DatasetVersion(DSL.name(alias), this);
+ }
+
+ @Override
+ public DatasetVersion as(Name alias) {
+ return new DatasetVersion(alias, this);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public DatasetVersion rename(String name) {
+ return new DatasetVersion(DSL.name(name), null);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public DatasetVersion rename(Name name) {
+ return new DatasetVersion(name, null);
+ }
+
+ // -------------------------------------------------------------------------
+ // Row6 type methods
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Row6 fieldsRow() {
+ return (Row6) super.fieldsRow();
+ }
+}
diff --git a/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/Project.java b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/Project.java
new file mode 100644
index 00000000000..93e64633be1
--- /dev/null
+++ b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/Project.java
@@ -0,0 +1,184 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package edu.uci.ics.texera.model.jooq.generated.tables;
+
+
+import edu.uci.ics.texera.model.jooq.generated.Indexes;
+import edu.uci.ics.texera.model.jooq.generated.Keys;
+import edu.uci.ics.texera.model.jooq.generated.TexeraDb;
+import edu.uci.ics.texera.model.jooq.generated.tables.records.ProjectRecord;
+
+import java.sql.Timestamp;
+import java.util.Arrays;
+import java.util.List;
+
+import org.jooq.Field;
+import org.jooq.ForeignKey;
+import org.jooq.Identity;
+import org.jooq.Index;
+import org.jooq.Name;
+import org.jooq.Record;
+import org.jooq.Row6;
+import org.jooq.Schema;
+import org.jooq.Table;
+import org.jooq.TableField;
+import org.jooq.UniqueKey;
+import org.jooq.impl.DSL;
+import org.jooq.impl.TableImpl;
+import org.jooq.types.UInteger;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class Project extends TableImpl {
+
+ private static final long serialVersionUID = -1242547085;
+
+ /**
+ * The reference instance of texera_db.project
+ */
+ public static final Project PROJECT = new Project();
+
+ /**
+ * The class holding records for this type
+ */
+ @Override
+ public Class getRecordType() {
+ return ProjectRecord.class;
+ }
+
+ /**
+ * The column texera_db.project.pid.
+ */
+ public final TableField PID = createField(DSL.name("pid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false).identity(true), this, "");
+
+ /**
+ * The column texera_db.project.name.
+ */
+ public final TableField NAME = createField(DSL.name("name"), org.jooq.impl.SQLDataType.VARCHAR(128).nullable(false), this, "");
+
+ /**
+ * The column texera_db.project.description.
+ */
+ public final TableField DESCRIPTION = createField(DSL.name("description"), org.jooq.impl.SQLDataType.VARCHAR(10000), this, "");
+
+ /**
+ * The column texera_db.project.owner_id.
+ */
+ public final TableField OWNER_ID = createField(DSL.name("owner_id"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, "");
+
+ /**
+ * The column texera_db.project.creation_time.
+ */
+ public final TableField CREATION_TIME = createField(DSL.name("creation_time"), org.jooq.impl.SQLDataType.TIMESTAMP.nullable(false).defaultValue(org.jooq.impl.DSL.field("CURRENT_TIMESTAMP", org.jooq.impl.SQLDataType.TIMESTAMP)), this, "");
+
+ /**
+ * The column texera_db.project.color.
+ */
+ public final TableField COLOR = createField(DSL.name("color"), org.jooq.impl.SQLDataType.VARCHAR(6), this, "");
+
+ /**
+ * Create a texera_db.project table reference
+ */
+ public Project() {
+ this(DSL.name("project"), null);
+ }
+
+ /**
+ * Create an aliased texera_db.project table reference
+ */
+ public Project(String alias) {
+ this(DSL.name(alias), PROJECT);
+ }
+
+ /**
+ * Create an aliased texera_db.project table reference
+ */
+ public Project(Name alias) {
+ this(alias, PROJECT);
+ }
+
+ private Project(Name alias, Table aliased) {
+ this(alias, aliased, null);
+ }
+
+ private Project(Name alias, Table aliased, Field>[] parameters) {
+ super(alias, null, aliased, parameters, DSL.comment(""));
+ }
+
+ public Project(Table child, ForeignKey key) {
+ super(child, key, PROJECT);
+ }
+
+ @Override
+ public Schema getSchema() {
+ return TexeraDb.TEXERA_DB;
+ }
+
+ @Override
+ public List getIndexes() {
+ return Arrays.asList(Indexes.PROJECT_IDX_USER_PROJECT_NAME_DESCRIPTION, Indexes.PROJECT_OWNER_ID, Indexes.PROJECT_PRIMARY);
+ }
+
+ @Override
+ public Identity getIdentity() {
+ return Keys.IDENTITY_PROJECT;
+ }
+
+ @Override
+ public UniqueKey getPrimaryKey() {
+ return Keys.KEY_PROJECT_PRIMARY;
+ }
+
+ @Override
+ public List> getKeys() {
+ return Arrays.>asList(Keys.KEY_PROJECT_PRIMARY, Keys.KEY_PROJECT_OWNER_ID);
+ }
+
+ @Override
+ public List> getReferences() {
+ return Arrays.>asList(Keys.PROJECT_IBFK_1);
+ }
+
+ public User user() {
+ return new User(this, Keys.PROJECT_IBFK_1);
+ }
+
+ @Override
+ public Project as(String alias) {
+ return new Project(DSL.name(alias), this);
+ }
+
+ @Override
+ public Project as(Name alias) {
+ return new Project(alias, this);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public Project rename(String name) {
+ return new Project(DSL.name(name), null);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public Project rename(Name name) {
+ return new Project(name, null);
+ }
+
+ // -------------------------------------------------------------------------
+ // Row6 type methods
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Row6 fieldsRow() {
+ return (Row6) super.fieldsRow();
+ }
+}
diff --git a/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/ProjectUserAccess.java b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/ProjectUserAccess.java
new file mode 100644
index 00000000000..a48168dd706
--- /dev/null
+++ b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/ProjectUserAccess.java
@@ -0,0 +1,167 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package edu.uci.ics.texera.model.jooq.generated.tables;
+
+
+import edu.uci.ics.texera.model.jooq.generated.Indexes;
+import edu.uci.ics.texera.model.jooq.generated.Keys;
+import edu.uci.ics.texera.model.jooq.generated.TexeraDb;
+import edu.uci.ics.texera.model.jooq.generated.enums.ProjectUserAccessPrivilege;
+import edu.uci.ics.texera.model.jooq.generated.tables.records.ProjectUserAccessRecord;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.jooq.Field;
+import org.jooq.ForeignKey;
+import org.jooq.Index;
+import org.jooq.Name;
+import org.jooq.Record;
+import org.jooq.Row3;
+import org.jooq.Schema;
+import org.jooq.Table;
+import org.jooq.TableField;
+import org.jooq.UniqueKey;
+import org.jooq.impl.DSL;
+import org.jooq.impl.TableImpl;
+import org.jooq.types.UInteger;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class ProjectUserAccess extends TableImpl {
+
+ private static final long serialVersionUID = -1326232717;
+
+ /**
+ * The reference instance of texera_db.project_user_access
+ */
+ public static final ProjectUserAccess PROJECT_USER_ACCESS = new ProjectUserAccess();
+
+ /**
+ * The class holding records for this type
+ */
+ @Override
+ public Class getRecordType() {
+ return ProjectUserAccessRecord.class;
+ }
+
+ /**
+ * The column texera_db.project_user_access.uid.
+ */
+ public final TableField UID = createField(DSL.name("uid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, "");
+
+ /**
+ * The column texera_db.project_user_access.pid.
+ */
+ public final TableField PID = createField(DSL.name("pid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, "");
+
+ /**
+ * The column texera_db.project_user_access.privilege.
+ */
+ public final TableField PRIVILEGE = createField(DSL.name("privilege"), org.jooq.impl.SQLDataType.VARCHAR(5).nullable(false).defaultValue(org.jooq.impl.DSL.inline("NONE", org.jooq.impl.SQLDataType.VARCHAR)).asEnumDataType(edu.uci.ics.texera.model.jooq.generated.enums.ProjectUserAccessPrivilege.class), this, "");
+
+ /**
+ * Create a texera_db.project_user_access table reference
+ */
+ public ProjectUserAccess() {
+ this(DSL.name("project_user_access"), null);
+ }
+
+ /**
+ * Create an aliased texera_db.project_user_access table reference
+ */
+ public ProjectUserAccess(String alias) {
+ this(DSL.name(alias), PROJECT_USER_ACCESS);
+ }
+
+ /**
+ * Create an aliased texera_db.project_user_access table reference
+ */
+ public ProjectUserAccess(Name alias) {
+ this(alias, PROJECT_USER_ACCESS);
+ }
+
+ private ProjectUserAccess(Name alias, Table aliased) {
+ this(alias, aliased, null);
+ }
+
+ private ProjectUserAccess(Name alias, Table aliased, Field>[] parameters) {
+ super(alias, null, aliased, parameters, DSL.comment(""));
+ }
+
+ public ProjectUserAccess(Table child, ForeignKey key) {
+ super(child, key, PROJECT_USER_ACCESS);
+ }
+
+ @Override
+ public Schema getSchema() {
+ return TexeraDb.TEXERA_DB;
+ }
+
+ @Override
+ public List getIndexes() {
+ return Arrays.asList(Indexes.PROJECT_USER_ACCESS_PID, Indexes.PROJECT_USER_ACCESS_PRIMARY);
+ }
+
+ @Override
+ public UniqueKey getPrimaryKey() {
+ return Keys.KEY_PROJECT_USER_ACCESS_PRIMARY;
+ }
+
+ @Override
+ public List> getKeys() {
+ return Arrays.>asList(Keys.KEY_PROJECT_USER_ACCESS_PRIMARY);
+ }
+
+ @Override
+ public List> getReferences() {
+ return Arrays.>asList(Keys.PROJECT_USER_ACCESS_IBFK_1, Keys.PROJECT_USER_ACCESS_IBFK_2);
+ }
+
+ public User user() {
+ return new User(this, Keys.PROJECT_USER_ACCESS_IBFK_1);
+ }
+
+ public Project project() {
+ return new Project(this, Keys.PROJECT_USER_ACCESS_IBFK_2);
+ }
+
+ @Override
+ public ProjectUserAccess as(String alias) {
+ return new ProjectUserAccess(DSL.name(alias), this);
+ }
+
+ @Override
+ public ProjectUserAccess as(Name alias) {
+ return new ProjectUserAccess(alias, this);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public ProjectUserAccess rename(String name) {
+ return new ProjectUserAccess(DSL.name(name), null);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public ProjectUserAccess rename(Name name) {
+ return new ProjectUserAccess(name, null);
+ }
+
+ // -------------------------------------------------------------------------
+ // Row3 type methods
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Row3 fieldsRow() {
+ return (Row3) super.fieldsRow();
+ }
+}
diff --git a/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/PublicProject.java b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/PublicProject.java
new file mode 100644
index 00000000000..3d62464eee2
--- /dev/null
+++ b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/PublicProject.java
@@ -0,0 +1,157 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package edu.uci.ics.texera.model.jooq.generated.tables;
+
+
+import edu.uci.ics.texera.model.jooq.generated.Indexes;
+import edu.uci.ics.texera.model.jooq.generated.Keys;
+import edu.uci.ics.texera.model.jooq.generated.TexeraDb;
+import edu.uci.ics.texera.model.jooq.generated.tables.records.PublicProjectRecord;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.jooq.Field;
+import org.jooq.ForeignKey;
+import org.jooq.Index;
+import org.jooq.Name;
+import org.jooq.Record;
+import org.jooq.Row2;
+import org.jooq.Schema;
+import org.jooq.Table;
+import org.jooq.TableField;
+import org.jooq.UniqueKey;
+import org.jooq.impl.DSL;
+import org.jooq.impl.TableImpl;
+import org.jooq.types.UInteger;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class PublicProject extends TableImpl {
+
+ private static final long serialVersionUID = -432300236;
+
+ /**
+ * The reference instance of texera_db.public_project
+ */
+ public static final PublicProject PUBLIC_PROJECT = new PublicProject();
+
+ /**
+ * The class holding records for this type
+ */
+ @Override
+ public Class getRecordType() {
+ return PublicProjectRecord.class;
+ }
+
+ /**
+ * The column texera_db.public_project.pid.
+ */
+ public final TableField PID = createField(DSL.name("pid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, "");
+
+ /**
+ * The column texera_db.public_project.uid.
+ */
+ public final TableField UID = createField(DSL.name("uid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED, this, "");
+
+ /**
+ * Create a texera_db.public_project table reference
+ */
+ public PublicProject() {
+ this(DSL.name("public_project"), null);
+ }
+
+ /**
+ * Create an aliased texera_db.public_project table reference
+ */
+ public PublicProject(String alias) {
+ this(DSL.name(alias), PUBLIC_PROJECT);
+ }
+
+ /**
+ * Create an aliased texera_db.public_project table reference
+ */
+ public PublicProject(Name alias) {
+ this(alias, PUBLIC_PROJECT);
+ }
+
+ private PublicProject(Name alias, Table aliased) {
+ this(alias, aliased, null);
+ }
+
+ private PublicProject(Name alias, Table aliased, Field>[] parameters) {
+ super(alias, null, aliased, parameters, DSL.comment(""));
+ }
+
+ public PublicProject(Table child, ForeignKey key) {
+ super(child, key, PUBLIC_PROJECT);
+ }
+
+ @Override
+ public Schema getSchema() {
+ return TexeraDb.TEXERA_DB;
+ }
+
+ @Override
+ public List getIndexes() {
+ return Arrays.asList(Indexes.PUBLIC_PROJECT_PRIMARY);
+ }
+
+ @Override
+ public UniqueKey getPrimaryKey() {
+ return Keys.KEY_PUBLIC_PROJECT_PRIMARY;
+ }
+
+ @Override
+ public List> getKeys() {
+ return Arrays.>asList(Keys.KEY_PUBLIC_PROJECT_PRIMARY);
+ }
+
+ @Override
+ public List> getReferences() {
+ return Arrays.>asList(Keys.PUBLIC_PROJECT_IBFK_1);
+ }
+
+ public Project project() {
+ return new Project(this, Keys.PUBLIC_PROJECT_IBFK_1);
+ }
+
+ @Override
+ public PublicProject as(String alias) {
+ return new PublicProject(DSL.name(alias), this);
+ }
+
+ @Override
+ public PublicProject as(Name alias) {
+ return new PublicProject(alias, this);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public PublicProject rename(String name) {
+ return new PublicProject(DSL.name(name), null);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public PublicProject rename(Name name) {
+ return new PublicProject(name, null);
+ }
+
+ // -------------------------------------------------------------------------
+ // Row2 type methods
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Row2 fieldsRow() {
+ return (Row2) super.fieldsRow();
+ }
+}
diff --git a/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/User.java b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/User.java
new file mode 100644
index 00000000000..b9439f75cc1
--- /dev/null
+++ b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/User.java
@@ -0,0 +1,180 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package edu.uci.ics.texera.model.jooq.generated.tables;
+
+
+import edu.uci.ics.texera.model.jooq.generated.Indexes;
+import edu.uci.ics.texera.model.jooq.generated.Keys;
+import edu.uci.ics.texera.model.jooq.generated.TexeraDb;
+import edu.uci.ics.texera.model.jooq.generated.enums.UserRole;
+import edu.uci.ics.texera.model.jooq.generated.tables.records.UserRecord;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.jooq.Field;
+import org.jooq.ForeignKey;
+import org.jooq.Identity;
+import org.jooq.Index;
+import org.jooq.Name;
+import org.jooq.Record;
+import org.jooq.Row7;
+import org.jooq.Schema;
+import org.jooq.Table;
+import org.jooq.TableField;
+import org.jooq.UniqueKey;
+import org.jooq.impl.DSL;
+import org.jooq.impl.TableImpl;
+import org.jooq.types.UInteger;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class User extends TableImpl {
+
+ private static final long serialVersionUID = 1854866232;
+
+ /**
+ * The reference instance of texera_db.user
+ */
+ public static final User USER = new User();
+
+ /**
+ * The class holding records for this type
+ */
+ @Override
+ public Class getRecordType() {
+ return UserRecord.class;
+ }
+
+ /**
+ * The column texera_db.user.uid.
+ */
+ public final TableField UID = createField(DSL.name("uid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false).identity(true), this, "");
+
+ /**
+ * The column texera_db.user.name.
+ */
+ public final TableField NAME = createField(DSL.name("name"), org.jooq.impl.SQLDataType.VARCHAR(256).nullable(false), this, "");
+
+ /**
+ * The column texera_db.user.email.
+ */
+ public final TableField EMAIL = createField(DSL.name("email"), org.jooq.impl.SQLDataType.VARCHAR(256), this, "");
+
+ /**
+ * The column texera_db.user.password.
+ */
+ public final TableField PASSWORD = createField(DSL.name("password"), org.jooq.impl.SQLDataType.VARCHAR(256), this, "");
+
+ /**
+ * The column texera_db.user.google_id.
+ */
+ public final TableField GOOGLE_ID = createField(DSL.name("google_id"), org.jooq.impl.SQLDataType.VARCHAR(256), this, "");
+
+ /**
+ * The column texera_db.user.role.
+ */
+ public final TableField ROLE = createField(DSL.name("role"), org.jooq.impl.SQLDataType.VARCHAR(10).nullable(false).defaultValue(org.jooq.impl.DSL.inline("INACTIVE", org.jooq.impl.SQLDataType.VARCHAR)).asEnumDataType(edu.uci.ics.texera.model.jooq.generated.enums.UserRole.class), this, "");
+
+ /**
+ * The column texera_db.user.google_avatar.
+ */
+ public final TableField GOOGLE_AVATAR = createField(DSL.name("google_avatar"), org.jooq.impl.SQLDataType.VARCHAR(100), this, "");
+
+ /**
+ * Create a texera_db.user table reference
+ */
+ public User() {
+ this(DSL.name("user"), null);
+ }
+
+ /**
+ * Create an aliased texera_db.user table reference
+ */
+ public User(String alias) {
+ this(DSL.name(alias), USER);
+ }
+
+ /**
+ * Create an aliased texera_db.user table reference
+ */
+ public User(Name alias) {
+ this(alias, USER);
+ }
+
+ private User(Name alias, Table aliased) {
+ this(alias, aliased, null);
+ }
+
+ private User(Name alias, Table aliased, Field>[] parameters) {
+ super(alias, null, aliased, parameters, DSL.comment(""));
+ }
+
+ public User(Table child, ForeignKey key) {
+ super(child, key, USER);
+ }
+
+ @Override
+ public Schema getSchema() {
+ return TexeraDb.TEXERA_DB;
+ }
+
+ @Override
+ public List getIndexes() {
+ return Arrays.asList(Indexes.USER_EMAIL, Indexes.USER_GOOGLE_ID, Indexes.USER_IDX_USER_NAME, Indexes.USER_PRIMARY);
+ }
+
+ @Override
+ public Identity getIdentity() {
+ return Keys.IDENTITY_USER;
+ }
+
+ @Override
+ public UniqueKey getPrimaryKey() {
+ return Keys.KEY_USER_PRIMARY;
+ }
+
+ @Override
+ public List> getKeys() {
+ return Arrays.>asList(Keys.KEY_USER_PRIMARY, Keys.KEY_USER_EMAIL, Keys.KEY_USER_GOOGLE_ID);
+ }
+
+ @Override
+ public User as(String alias) {
+ return new User(DSL.name(alias), this);
+ }
+
+ @Override
+ public User as(Name alias) {
+ return new User(alias, this);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public User rename(String name) {
+ return new User(DSL.name(name), null);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public User rename(Name name) {
+ return new User(name, null);
+ }
+
+ // -------------------------------------------------------------------------
+ // Row7 type methods
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Row7 fieldsRow() {
+ return (Row7) super.fieldsRow();
+ }
+}
diff --git a/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/UserConfig.java b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/UserConfig.java
new file mode 100644
index 00000000000..693a9be39a8
--- /dev/null
+++ b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/UserConfig.java
@@ -0,0 +1,162 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package edu.uci.ics.texera.model.jooq.generated.tables;
+
+
+import edu.uci.ics.texera.model.jooq.generated.Indexes;
+import edu.uci.ics.texera.model.jooq.generated.Keys;
+import edu.uci.ics.texera.model.jooq.generated.TexeraDb;
+import edu.uci.ics.texera.model.jooq.generated.tables.records.UserConfigRecord;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.jooq.Field;
+import org.jooq.ForeignKey;
+import org.jooq.Index;
+import org.jooq.Name;
+import org.jooq.Record;
+import org.jooq.Row3;
+import org.jooq.Schema;
+import org.jooq.Table;
+import org.jooq.TableField;
+import org.jooq.UniqueKey;
+import org.jooq.impl.DSL;
+import org.jooq.impl.TableImpl;
+import org.jooq.types.UInteger;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class UserConfig extends TableImpl {
+
+ private static final long serialVersionUID = -582808932;
+
+ /**
+ * The reference instance of texera_db.user_config
+ */
+ public static final UserConfig USER_CONFIG = new UserConfig();
+
+ /**
+ * The class holding records for this type
+ */
+ @Override
+ public Class getRecordType() {
+ return UserConfigRecord.class;
+ }
+
+ /**
+ * The column texera_db.user_config.uid.
+ */
+ public final TableField UID = createField(DSL.name("uid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, "");
+
+ /**
+ * The column texera_db.user_config.key.
+ */
+ public final TableField KEY = createField(DSL.name("key"), org.jooq.impl.SQLDataType.VARCHAR(256).nullable(false), this, "");
+
+ /**
+ * The column texera_db.user_config.value.
+ */
+ public final TableField VALUE = createField(DSL.name("value"), org.jooq.impl.SQLDataType.CLOB.nullable(false), this, "");
+
+ /**
+ * Create a texera_db.user_config table reference
+ */
+ public UserConfig() {
+ this(DSL.name("user_config"), null);
+ }
+
+ /**
+ * Create an aliased texera_db.user_config table reference
+ */
+ public UserConfig(String alias) {
+ this(DSL.name(alias), USER_CONFIG);
+ }
+
+ /**
+ * Create an aliased texera_db.user_config table reference
+ */
+ public UserConfig(Name alias) {
+ this(alias, USER_CONFIG);
+ }
+
+ private UserConfig(Name alias, Table aliased) {
+ this(alias, aliased, null);
+ }
+
+ private UserConfig(Name alias, Table aliased, Field>[] parameters) {
+ super(alias, null, aliased, parameters, DSL.comment(""));
+ }
+
+ public UserConfig(Table child, ForeignKey key) {
+ super(child, key, USER_CONFIG);
+ }
+
+ @Override
+ public Schema getSchema() {
+ return TexeraDb.TEXERA_DB;
+ }
+
+ @Override
+ public List getIndexes() {
+ return Arrays.asList(Indexes.USER_CONFIG_PRIMARY);
+ }
+
+ @Override
+ public UniqueKey getPrimaryKey() {
+ return Keys.KEY_USER_CONFIG_PRIMARY;
+ }
+
+ @Override
+ public List> getKeys() {
+ return Arrays.>asList(Keys.KEY_USER_CONFIG_PRIMARY);
+ }
+
+ @Override
+ public List> getReferences() {
+ return Arrays.>asList(Keys.USER_CONFIG_IBFK_1);
+ }
+
+ public User user() {
+ return new User(this, Keys.USER_CONFIG_IBFK_1);
+ }
+
+ @Override
+ public UserConfig as(String alias) {
+ return new UserConfig(DSL.name(alias), this);
+ }
+
+ @Override
+ public UserConfig as(Name alias) {
+ return new UserConfig(alias, this);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public UserConfig rename(String name) {
+ return new UserConfig(DSL.name(name), null);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public UserConfig rename(Name name) {
+ return new UserConfig(name, null);
+ }
+
+ // -------------------------------------------------------------------------
+ // Row3 type methods
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Row3 fieldsRow() {
+ return (Row3) super.fieldsRow();
+ }
+}
diff --git a/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/Workflow.java b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/Workflow.java
new file mode 100644
index 00000000000..58d708e70bb
--- /dev/null
+++ b/core/micro-services/dao/src/main/scala/edu/uci/ics/texera/model/jooq/generated/tables/Workflow.java
@@ -0,0 +1,180 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package edu.uci.ics.texera.model.jooq.generated.tables;
+
+
+import edu.uci.ics.texera.model.jooq.generated.Indexes;
+import edu.uci.ics.texera.model.jooq.generated.Keys;
+import edu.uci.ics.texera.model.jooq.generated.TexeraDb;
+import edu.uci.ics.texera.model.jooq.generated.tables.records.WorkflowRecord;
+
+import java.sql.Timestamp;
+import java.util.Arrays;
+import java.util.List;
+
+import org.jooq.Field;
+import org.jooq.ForeignKey;
+import org.jooq.Identity;
+import org.jooq.Index;
+import org.jooq.Name;
+import org.jooq.Record;
+import org.jooq.Row7;
+import org.jooq.Schema;
+import org.jooq.Table;
+import org.jooq.TableField;
+import org.jooq.UniqueKey;
+import org.jooq.impl.DSL;
+import org.jooq.impl.TableImpl;
+import org.jooq.types.UInteger;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class Workflow extends TableImpl {
+
+ private static final long serialVersionUID = -1272794068;
+
+ /**
+ * The reference instance of texera_db.workflow
+ */
+ public static final Workflow WORKFLOW = new Workflow();
+
+ /**
+ * The class holding records for this type
+ */
+ @Override
+ public Class getRecordType() {
+ return WorkflowRecord.class;
+ }
+
+ /**
+ * The column texera_db.workflow.name.
+ */
+ public final TableField NAME = createField(DSL.name("name"), org.jooq.impl.SQLDataType.VARCHAR(128).nullable(false), this, "");
+
+ /**
+ * The column texera_db.workflow.description.
+ */
+ public final TableField DESCRIPTION = createField(DSL.name("description"), org.jooq.impl.SQLDataType.VARCHAR(500), this, "");
+
+ /**
+ * The column