Skip to content

Commit

Permalink
[SQL] Require test_names.Sub_group to not be null (aces#8933)
Browse files Browse the repository at this point in the history
Changes constraints on test_names.Sub_group so that it can not be
null.

Resolves aces#4268
  • Loading branch information
driusan authored Nov 7, 2023
1 parent 9035962 commit db9ed84
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion SQL/0000-00-00-schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ CREATE TABLE `test_names` (
`ID` int(10) unsigned NOT NULL auto_increment,
`Test_name` varchar(255) default NULL,
`Full_name` varchar(255) default NULL,
`Sub_group` int(11) unsigned default NULL,
`Sub_group` int(11) unsigned NOT NULL,
`IsDirectEntry` boolean default NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `Test_name` (`Test_name`),
Expand Down
1 change: 1 addition & 0 deletions SQL/New_patches/2023-11-07-No-Null-Subgroup.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE test_names CHANGE Sub_group Sub_group int(11) unsigned not null;
1 change: 1 addition & 0 deletions modules/dashboard/test/DashboardTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ function setUp(): void
[
'ID' => '111',
'Test_name' => 'TestName11111111111',
'Sub_group' => 1,
]
);
$this->DB->insert(
Expand Down

0 comments on commit db9ed84

Please sign in to comment.