Skip to content

Commit

Permalink
make not null with default value
Browse files Browse the repository at this point in the history
  • Loading branch information
yanavasileva committed Nov 18, 2024
1 parent b78ce25 commit 733dfb8
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ create table ACT_HI_COMMENT (
FULL_MSG_ BLOB,
TENANT_ID_ varchar(64),
REMOVAL_TIME_ timestamp,
REV_ integer,
REV_ integer not null default 1,
primary key (ID_)
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ create table ACT_HI_COMMENT (
FULL_MSG_ longvarbinary,
TENANT_ID_ varchar(64),
REMOVAL_TIME_ timestamp,
REV_ integer,
REV_ integer not null default 1,
primary key (ID_)
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ create table ACT_HI_COMMENT (
FULL_MSG_ LONGBLOB,
TENANT_ID_ varchar(64),
REMOVAL_TIME_ datetime(3),
REV_ integer,
REV_ integer not null default 1,
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ create table ACT_HI_COMMENT (
FULL_MSG_ image,
TENANT_ID_ nvarchar(64),
REMOVAL_TIME_ datetime2,
REV_ integer,
REV_ integer not null default 1,
primary key (ID_)
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ create table ACT_HI_COMMENT (
FULL_MSG_ LONGBLOB,
TENANT_ID_ varchar(64),
REMOVAL_TIME_ datetime,
REV_ integer,
REV_ integer not null default 1,
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ create table ACT_HI_COMMENT (
FULL_MSG_ BLOB,
TENANT_ID_ NVARCHAR2(64),
REMOVAL_TIME_ TIMESTAMP(6),
REV_ INTEGER,
REV_ INTEGER DEFAULT 1 NOT NULL,
primary key (ID_)
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ create table ACT_HI_COMMENT (
FULL_MSG_ bytea,
TENANT_ID_ varchar(64),
REMOVAL_TIME_ timestamp,
REV_ integer,
REV_ integer not null default 1,
primary key (ID_)
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,5 @@ insert into ACT_GE_SCHEMA_LOG
values ('1200', CURRENT_TIMESTAMP, '7.23.0');

alter table ACT_HI_COMMENT
add column REV_ integer;

-- Set revision number to already existing comments
-- if any for backward compatibility
update ACT_HI_COMMENT
set REV_ = 1
where REV_ is null;
add column REV_ integer not null
default 1;
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ insert into ACT_GE_SCHEMA_LOG
values ('1200', CURRENT_TIMESTAMP, '7.23.0');

alter table ACT_HI_COMMENT
add column REV_ integer;
add column REV_ integer not null
default 1;

-- Set revision number to already existing comments
-- if any for backward compatibility
update ACT_HI_COMMENT
set REV_ = 1
where REV_ is null;
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,5 @@ insert into ACT_GE_SCHEMA_LOG
values ('1200', CURRENT_TIMESTAMP, '7.23.0');

alter table ACT_HI_COMMENT
add column REV_ integer;

-- Set revision number to already existing comments
-- if any for backward compatibility
update ACT_HI_COMMENT
set REV_ = 1
where REV_ is null;
add column REV_ integer not null
default 1;
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,5 @@ insert into ACT_GE_SCHEMA_LOG
values ('1200', CURRENT_TIMESTAMP, '7.23.0');

alter table ACT_HI_COMMENT
add REV_ integer;

-- Set revision number to already existing comments
-- if any for backward compatibility
update ACT_HI_COMMENT
set REV_ = 1
where REV_ is null;
add REV_ integer
not null default 1;
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,5 @@ insert into ACT_GE_SCHEMA_LOG
values ('1200', CURRENT_TIMESTAMP, '7.23.0');

alter table ACT_HI_COMMENT
add column REV_ INTEGER;

-- Set revision number to already existing comments
-- if any for backward compatibility
update ACT_HI_COMMENT
set REV_ = 1
where REV_ is null;
add column REV_ INTEGER not null
default 1;
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,4 @@ insert into ACT_GE_SCHEMA_LOG
values ('1200', CURRENT_TIMESTAMP, '7.23.0');

alter table ACT_HI_COMMENT
add REV_ integer;

-- Set revision number to already existing comments
-- if any for backward compatibility
update ACT_HI_COMMENT
set REV_ = 1
where REV_ is null;
add REV_ integer default 1 not null;
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,5 @@ insert into ACT_GE_SCHEMA_LOG
values ('1200', CURRENT_TIMESTAMP, '7.23.0');

alter table ACT_HI_COMMENT
add column REV_ integer;

-- Set revision number to already existing comments
-- if any for backward compatibility
update ACT_HI_COMMENT
set REV_ = 1
where REV_ is null;
add column REV_ integer not null
default 1;

0 comments on commit 733dfb8

Please sign in to comment.