Skip to content

Commit

Permalink
chore(mariadb): revert the bootstrapping script.
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangthanh28 committed Dec 26, 2024
1 parent 65bd398 commit c1632e2
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 50 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
IF NOT EXISTS (SELECT 1
FROM INFORMATION_SCHEMA.TABLES
WHERE table_schema = DATABASE() AND `table_name` = '{{SchemaName}}_{{ScriptsRunTable}}'
) THEN
CREATE TABLE {{SchemaName}}_{{ScriptsRunTable}}(
id bigint NOT NULL AUTO_INCREMENT,
version_id BIGINT NULL,
script_name varchar(255) NULL,
text_of_script text NULL,
text_hash varchar(512) NULL,
one_time_script boolean NULL,
entry_date timestamp NULL,
modified_date timestamp NULL,
entered_by varchar(50) NULL,
CONSTRAINT PK_{{ScriptsRunTable}}_id PRIMARY KEY (id)
);
END IF;
CREATE TABLE {{SchemaName}}_{{ScriptsRunTable}}(
id bigint NOT NULL AUTO_INCREMENT,
version_id BIGINT NULL,
script_name varchar(255) NULL,
text_of_script text NULL,
text_hash varchar(512) NULL,
one_time_script boolean NULL,
entry_date timestamp NULL,
modified_date timestamp NULL,
entered_by varchar(50) NULL,
CONSTRAINT PK_{{ScriptsRunTable}}_id PRIMARY KEY (id)
)
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
IF NOT EXISTS (SELECT 1
FROM INFORMATION_SCHEMA.TABLES
WHERE table_schema = DATABASE() AND `table_name` = '{{SchemaName}}_{{ScriptsRunErrorsTable}}'
) THEN
CREATE TABLE {{SchemaName}}_{{ScriptsRunErrorsTable}}(
id bigint NOT NULL AUTO_INCREMENT,
repository_path varchar(255) NULL,
version varchar(50) NULL,
script_name varchar(255) NULL,
text_of_script text NULL,
erroneous_part_of_script text NULL,
error_message text NULL,
entry_date timestamp NULL,
modified_date timestamp NULL,
entered_by varchar(50) NULL,
CONSTRAINT PK_{{ScriptsRunErrorsTable}}_id PRIMARY KEY (id)
);
END IF;
CREATE TABLE {{SchemaName}}_{{ScriptsRunErrorsTable}}(
id bigint NOT NULL AUTO_INCREMENT,
repository_path varchar(255) NULL,
version varchar(50) NULL,
script_name varchar(255) NULL,
text_of_script text NULL,
erroneous_part_of_script text NULL,
error_message text NULL,
entry_date timestamp NULL,
modified_date timestamp NULL,
entered_by varchar(50) NULL,
CONSTRAINT PK_{{ScriptsRunErrorsTable}}_id PRIMARY KEY (id)
)
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
IF NOT EXISTS (SELECT 1
FROM INFORMATION_SCHEMA.TABLES
WHERE table_schema = DATABASE() AND `table_name` = '{{SchemaName}}_{{VersionTable}}'
) THEN
CREATE TABLE {{SchemaName}}_{{VersionTable}}(
id bigint NOT NULL AUTO_INCREMENT,
repository_path varchar(255) NULL,
version varchar(50) NULL,
entry_date timestamp NULL,
modified_date timestamp NULL,
entered_by varchar(50) NULL,
status varchar(50) NULL,
CONSTRAINT PK_{{VersionTable}}_id PRIMARY KEY (id)
);
END IF;
CREATE TABLE {{SchemaName}}_{{VersionTable}}(
id bigint NOT NULL AUTO_INCREMENT,
repository_path varchar(255) NULL,
version varchar(50) NULL,
entry_date timestamp NULL,
modified_date timestamp NULL,
entered_by varchar(50) NULL,
status varchar(50) NULL,
CONSTRAINT PK_{{VersionTable}}_id PRIMARY KEY (id)
)

0 comments on commit c1632e2

Please sign in to comment.