Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database migration failure from cdash:v3.5.1 to cdash:latest #2448

Open
wmason-lanl opened this issue Sep 18, 2024 · 6 comments
Open

Database migration failure from cdash:v3.5.1 to cdash:latest #2448

wmason-lanl opened this issue Sep 18, 2024 · 6 comments

Comments

@wmason-lanl
Copy link

I'm encountering the following database migration failure when upgrading from cdash:v3.5.1 to cdash:latest. Please advise.

.......... 246,813ms FAIL
[2024-09-18 18:34:32] production.ERROR: SQLSTATE[HY000]: General error: 3780 Referencing column 'testid' and referenced column 'id' in foreign key constraint 'testmeasurement_testid_foreign' are incompatible. (Connection: mysql, SQL: alter table `testmeasurement` add constraint `testmeasurement_testid_foreign` foreign key (`testid`) references `build2test` (`id`) on delete cascade) {"exception":"[object] (Illuminate\\Database\\QueryException(code: HY000): SQLSTATE[HY000]: General error: 3780 Referencing column 'testid' and referenced column 'id' in foreign key constraint 'testmeasurement_testid_foreign' are incompatible. (Connection: mysql, SQL: alter table `testmeasurement` add constraint `testmeasurement_testid_foreign` foreign key (`testid`) references `build2test` (`id`) on delete cascade) at /cdash/vendor/laravel/framework/src/Illuminate/Database/Connection.php:829)
[stacktrace]
#0 /cdash/vendor/laravel/framework/src/Illuminate/Database/Connection.php(783): Illuminate\\Database\\Connection->runQueryCallback('alter table `te...', Array, Object(Closure))
#1 /cdash/vendor/laravel/framework/src/Illuminate/Database/Connection.php(576): Illuminate\\Database\\Connection->run('alter table `te...', Array, Object(Closure))
#2 /cdash/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php(110): Illuminate\\Database\\Connection->statement('alter table `te...')

#3 /cdash/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(602): Illuminate\\Database\\Schema\\Blueprint->build(Object(Illuminate\\Database\\MySqlConnection), Object(Illuminate\\Database\\Schema\\Grammars\\MySqlGrammar))
#4 /cdash/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(444): Illuminate\\Database\\Schema\\Builder->build(Object(Illuminate\\Database\\Schema\\Blueprint))
#5 /cdash/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(355): Illuminate\\Database\\Schema\\Builder->table('testmeasurement', Object(Closure))
#6 /cdash/database/migrations/2024_07_09_025240_find_test_measurements_by_testid.php(47): Illuminate\\Support\\Facades\\Facade::__callStatic('table', Array)
#7 /cdash/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(493): Illuminate\\Database\\Migrations\\Migration@anonymous->up()
#8 /cdash/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(410): Illuminate\\Database\\Migrations\\Migrator->runMethod(Object(Illuminate\\Database\\MySqlConnection), Object(Illuminate\\Database\\Migrations\\Migration@anonymous), 'up')
#9 /cdash/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(419): Illuminate\\Database\\Migrations\\Migrator->Illuminate\\Database\\Migrations\\{closure}()
#10 /cdash/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(216): Illuminate\\Database\\Migrations\\Migrator->runMigration(Object(Illuminate\\Database\\Migrations\\Migration@anonymous), 'up')
#11 /cdash/vendor/laravel/framework/src/Illuminate/Console/View/Components/Task.php(37): Illuminate\\Database\\Migrations\\Migrator->Illuminate\\Database\\Migrations\\{closure}()
#12 /cdash/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(756): Illuminate\\Console\\View\\Components\\Task->render('2024_07_09_0252...', Object(Closure))
#13 /cdash/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(216): Illuminate\\Database\\Migrations\\Migrator->write('Illuminate\\\\Cons...', '2024_07_09_0252...', Object(Closure))
#14 /cdash/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(181): Illuminate\\Database\\Migrations\\Migrator->runUp('/cdash/database...', 3, false)
#15 /cdash/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(124): Illuminate\\Database\\Migrations\\Migrator->runPending(Array, Array)
#16 /cdash/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(90): Illuminate\\Database\\Migrations\\Migrator->run(Array, Array)
#17 /cdash/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(633): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->Illuminate\\Database\\Console\\Migrations\\{closure}()
#18 /cdash/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(83): Illuminate\\Database\\Migrations\\Migrator->usingConnection(NULL, Object(Closure))
#19 /cdash/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->handle()
#20 /cdash/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#21 /cdash/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#22 /cdash/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#23 /cdash/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#24 /cdash/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\\Container\\Container->call(Array)
#25 /cdash/vendor/symfony/console/Command/Command.php(326): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#26 /cdash/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#27 /cdash/vendor/symfony/console/Application.php(1096): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#28 /cdash/vendor/symfony/console/Application.php(324): Symfony\\Component\\Console\\Application->doRunCommand(Object(Illuminate\\Database\\Console\\Migrations\\MigrateCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#29 /cdash/vendor/symfony/console/Application.php(175): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#30 /cdash/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#31 /cdash/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#32 {main}

[previous exception] [object] (PDOException(code: HY000): SQLSTATE[HY000]: General error: 3780 Referencing column 'testid' and referenced column 'id' in foreign key constraint 'testmeasurement_testid_foreign' are incompatible. at /cdash/vendor/laravel/framework/src/Illuminate/Database/Connection.php:587)
[stacktrace]
#0 /cdash/vendor/laravel/framework/src/Illuminate/Database/Connection.php(587): PDOStatement->execute()
#1 /cdash/vendor/laravel/framework/src/Illuminate/Database/Connection.php(816): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}('alter table `te...', Array)
#2 /cdash/vendor/laravel/framework/src/Illuminate/Database/Connection.php(783): Illuminate\\Database\\Connection->runQueryCallback('alter table `te...', Array, Object(Closure))
#3 /cdash/vendor/laravel/framework/src/Illuminate/Database/Connection.php(576): Illuminate\\Database\\Connection->run('alter table `te...', Array, Object(Closure))
#4 /cdash/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php(110): Illuminate\\Database\\Connection->statement('alter table `te...')
#5 /cdash/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(602): Illuminate\\Database\\Schema\\Blueprint->build(Object(Illuminate\\Database\\MySqlConnection), Object(Illuminate\\Database\\Schema\\Grammars\\MySqlGrammar))
#6 /cdash/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(444): Illuminate\\Database\\Schema\\Builder->build(Object(Illuminate\\Database\\Schema\\Blueprint))
#7 /cdash/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(355): Illuminate\\Database\\Schema\\Builder->table('testmeasurement', Object(Closure))
#8 /cdash/database/migrations/2024_07_09_025240_find_test_measurements_by_testid.php(47): Illuminate\\Support\\Facades\\Facade::__callStatic('table', Array)
#9 /cdash/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(493): Illuminate\\Database\\Migrations\\Migration@anonymous->up()
#10 /cdash/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(410): Illuminate\\Database\\Migrations\\Migrator->runMethod(Object(Illuminate\\Database\\MySqlConnection), Object(Illuminate\\Database\\Migrations\\Migration@anonymous), 'up')
#11 /cdash/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(419): Illuminate\\Database\\Migrations\\Migrator->Illuminate\\Database\\Migrations\\{closure}()
#12 /cdash/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(216): Illuminate\\Database\\Migrations\\Migrator->runMigration(Object(Illuminate\\Database\\Migrations\\Migration@anonymous), 'up')
#13 /cdash/vendor/laravel/framework/src/Illuminate/Console/View/Components/Task.php(37): Illuminate\\Database\\Migrations\\Migrator->Illuminate\\Database\\Migrations\\{closure}()
#14 /cdash/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(756): Illuminate\\Console\\View\\Components\\Task->render('2024_07_09_0252...', Object(Closure))
#15 /cdash/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(216): Illuminate\\Database\\Migrations\\Migrator->write('Illuminate\\\\Cons...', '2024_07_09_0252...', Object(Closure))
#16 /cdash/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(181): Illuminate\\Database\\Migrations\\Migrator->runUp('/cdash/database...', 3, false)
#17 /cdash/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(124): Illuminate\\Database\\Migrations\\Migrator->runPending(Array, Array)
#18 /cdash/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(90): Illuminate\\Database\\Migrations\\Migrator->run(Array, Array)
#19 /cdash/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(633): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->Illuminate\\Database\\Console\\Migrations\\{closure}()
#20 /cdash/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(83): Illuminate\\Database\\Migrations\\Migrator->usingConnection(NULL, Object(Closure))
#21 /cdash/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->handle()
#22 /cdash/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#23 /cdash/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#24 /cdash/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#25 /cdash/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#26 /cdash/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\\Container\\Container->call(Array)
#27 /cdash/vendor/symfony/console/Command/Command.php(326): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#28 /cdash/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#29 /cdash/vendor/symfony/console/Application.php(1096): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#30 /cdash/vendor/symfony/console/Application.php(324): Symfony\\Component\\Console\\Application->doRunCommand(Object(Illuminate\\Database\\Console\\Migrations\\MigrateCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#31 /cdash/vendor/symfony/console/Application.php(175): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#32 /cdash/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#33 /cdash/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#34 {main}
"}
In Connection.php line 829:

  SQLSTATE[HY000]: General error: 3780 Referencing column 'testid' and refere
  nced column 'id' in foreign key constraint 'testmeasurement_testid_foreign'
   are incompatible. (Connection: mysql, SQL: alter table `testmeasurement` a
  dd constraint `testmeasurement_testid_foreign` foreign key (`testid`) refer
  ences `build2test` (`id`) on delete cascade)


In Connection.php line 587:

  SQLSTATE[HY000]: General error: 3780 Referencing column 'testid' and refere
  nced column 'id' in foreign key constraint 'testmeasurement_testid_foreign'
   are incompatible.
@williamjallen
Copy link
Collaborator

What database (and version) are you using?

@wmason-lanl
Copy link
Author

wmason-lanl commented Sep 18, 2024

MySQL version 8.0.32

2ee840f44136   mysql/mysql-server:8.0   "/entrypoint.sh mysq…"   18 minutes ago   Up 18 minutes (healthy)   3306/tcp, 33060-33061/tcp                         cdash_mysql

# mysql --version
mysql  Ver 8.0.32 for Linux on x86_64 (MySQL Community Server - GPL)

@williamjallen
Copy link
Collaborator

I was able to successfully run the migration using the latest cdash image with the exact same version of MySQL. What do you see if you run show create table testmeasurement and show create table build2test? On my brand new installation, both testmeasurement(testid) and build2test(id) are unsigned ints, and thus compatible.

@wmason-lanl
Copy link
Author

I don't see testmeasurement(testid) and build2test(id) isn't unsigned. Did I miss some database migrations from previous versions?

Here is the output from the existing database that is having migration problems:

mysql> show create table testmeasurement;
+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table           | Create Table                                                                                                                                                                                                                                                                                                                        |
+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| testmeasurement | CREATE TABLE `testmeasurement` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `outputid` bigint NOT NULL,
  `name` varchar(70) NOT NULL,
  `type` varchar(70) NOT NULL,
  `value` mediumtext NOT NULL COMMENT ' ',
  PRIMARY KEY (`id`),
  KEY `outputid` (`outputid`)
) ENGINE=InnoDB AUTO_INCREMENT=130265095 DEFAULT CHARSET=utf8mb3 |
+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> show create table build2test;
+------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table      | Create Table                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
+------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| build2test | CREATE TABLE `build2test` (
  `id` int NOT NULL AUTO_INCREMENT,
  `buildid` int NOT NULL DEFAULT '0',
  `outputid` int NOT NULL DEFAULT '0',
  `status` varchar(10) NOT NULL DEFAULT '',
  `details` varchar(255) NOT NULL DEFAULT '',
  `time` float(7,2) NOT NULL DEFAULT '0.00',
  `timemean` float(7,2) NOT NULL DEFAULT '0.00',
  `timestd` float(7,2) NOT NULL DEFAULT '0.00',
  `timestatus` tinyint NOT NULL DEFAULT '0',
  `newstatus` tinyint NOT NULL DEFAULT '0',
  `testname` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `build2test_testname_id_unique` (`testname`,`id`),
  UNIQUE KEY `build2test_id_testname_unique` (`id`,`testname`),
  KEY `buildid` (`buildid`),
  KEY `outputid` (`outputid`),
  KEY `status` (`status`),
  KEY `timestatus` (`timestatus`),
  KEY `newstatus` (`newstatus`),
  KEY `build2test_testid_buildid_index` (`buildid`),
  KEY `build2test_buildid_testid_index` (`buildid`),
  KEY `build2test_testname_buildid_index` (`testname`,`buildid`),
  KEY `build2test_buildid_testname_index` (`buildid`,`testname`),
  KEY `build2test_testname_outputid_index` (`testname`,`outputid`),
  KEY `build2test_outputid_testname_index` (`outputid`,`testname`),
  KEY `build2test_buildid_outputid_index` (`buildid`,`outputid`),
  KEY `build2test_outputid_buildid_index` (`outputid`,`buildid`),
  CONSTRAINT `build2test_buildid_foreign` FOREIGN KEY (`buildid`) REFERENCES `build` (`id`) ON DELETE CASCADE,
  CONSTRAINT `build2test_outputid_foreign` FOREIGN KEY (`outputid`) REFERENCES `testoutput` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=95649276 DEFAULT CHARSET=utf8mb3 |
+------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

Here is the output from a freshly installed database:

mysql> show create table testmeasurement;
+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table           | Create Table                                                                                                                                                                                                                                                                                                                                                                                                                                            |
+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| testmeasurement | CREATE TABLE `testmeasurement` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `name` varchar(70) NOT NULL,
  `type` varchar(70) NOT NULL,
  `value` mediumtext NOT NULL COMMENT ' ',
  `testid` int unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `testmeasurement_testid_index` (`testid`),
  CONSTRAINT `testmeasurement_testid_foreign` FOREIGN KEY (`testid`) REFERENCES `build2test` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 |
+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> show create table build2test;
+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table      | Create Table                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| build2test | CREATE TABLE `build2test` (
  `buildid` int NOT NULL DEFAULT '0',
  `outputid` int NOT NULL DEFAULT '0',
  `status` varchar(10) NOT NULL DEFAULT '',
  `time` decimal(7,2) NOT NULL DEFAULT '0.00',
  `timemean` decimal(7,2) NOT NULL DEFAULT '0.00',
  `timestd` decimal(7,2) NOT NULL DEFAULT '0.00',
  `timestatus` tinyint NOT NULL DEFAULT '0',
  `newstatus` tinyint NOT NULL DEFAULT '0',
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `details` varchar(255) NOT NULL DEFAULT '',
  `testname` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `build2test_testname_id_unique` (`testname`,`id`),
  UNIQUE KEY `build2test_id_testname_unique` (`id`,`testname`),
  KEY `build2test_buildid_index` (`buildid`),
  KEY `build2test_outputid_index` (`outputid`),
  KEY `build2test_status_index` (`status`),
  KEY `build2test_timestatus_index` (`timestatus`),
  KEY `build2test_newstatus_index` (`newstatus`),
  KEY `build2test_testid_buildid_index` (`buildid`),
  KEY `build2test_buildid_testid_index` (`buildid`),
  KEY `build2test_testname_buildid_index` (`testname`,`buildid`),
  KEY `build2test_buildid_testname_index` (`buildid`,`testname`),
  KEY `build2test_testname_outputid_index` (`testname`,`outputid`),
  KEY `build2test_outputid_testname_index` (`outputid`,`testname`),
  KEY `build2test_buildid_outputid_index` (`buildid`,`outputid`),
  KEY `build2test_outputid_buildid_index` (`outputid`,`buildid`),
  CONSTRAINT `build2test_buildid_foreign` FOREIGN KEY (`buildid`) REFERENCES `build` (`id`) ON DELETE CASCADE,
  CONSTRAINT `build2test_outputid_foreign` FOREIGN KEY (`outputid`) REFERENCES `testoutput` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 |
+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

@williamjallen
Copy link
Collaborator

williamjallen commented Sep 18, 2024

It looks like this is a real issue which went unnoticed in our CI because fresh instances are not affected. Please let me know if #2449 does not resolve your issue. Edit: I confused myself while rolling the migration forwards and backwards a couple times while making edits to it. #2449 does not resolve this issue.

@williamjallen
Copy link
Collaborator

@wmason-lanl If CDash 3.5.1 was working successfully and nothing else looks out of place, you could try changing the type of build2test(id) to an unsigned int to match what the migration expects to exist, and what new systems have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants