From 8fbf4edeb020ee3ae9066d4f9ce374b09bb1ac9f Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Fri, 5 Jan 2024 17:27:26 +0100 Subject: [PATCH] Clean old files --- README.md | 11 ++-- dbUpgrade.sh | 9 --- schema.sql | 154 --------------------------------------------------- 3 files changed, 5 insertions(+), 169 deletions(-) delete mode 100755 dbUpgrade.sh delete mode 100644 schema.sql diff --git a/README.md b/README.md index 452cb23a..ee487caf 100644 --- a/README.md +++ b/README.md @@ -9,12 +9,6 @@ Its purpose is to : 2. let people browse a report of a test execution 3. display some statistics about test failures -## Usage - -Create a database following the schema provided in schema.sql at the root of the project. - -Don't forget to launch `composer install` to install all dependencies. - ### Configuration You can create a `.env.local` file at the root of the project. You can also pass the values via environment variables. @@ -26,6 +20,11 @@ Here are the main ones: | DATABASE_URL | DSN for MySQL Server | | QANB_TOKEN | Token to add JSON data through the Hook | +## Usage + +Install dependencies with a `composer install`. + +Create a database with a `php bin/console doctrine:schema:update --dump-sql --force`. ## Web server configuration diff --git a/dbUpgrade.sh b/dbUpgrade.sh deleted file mode 100755 index 7f691f22..00000000 --- a/dbUpgrade.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -echo "Launching DB upgrade php script..." - -/usr/local/bin/php src/Upgrade/upgrade.php - -exitCode=$? - -echo "Script ended with this exit code: $exitCode" diff --git a/schema.sql b/schema.sql deleted file mode 100644 index 752a13b9..00000000 --- a/schema.sql +++ /dev/null @@ -1,154 +0,0 @@ --- --- Table structure for table `execution` --- - -CREATE TABLE `execution` ( - `id` int(11) NOT NULL, - `ref` bigint(11) NOT NULL, - `filename` varchar(50) NOT NULL, - `start_date` timestamp NULL DEFAULT NULL, - `end_date` timestamp NULL DEFAULT NULL, - `duration` int(11) NOT NULL, - `version` varchar(20) NOT NULL, - `campaign` varchar(50) NOT NULL DEFAULT 'functional', - `platform` varchar(50) NOT NULL DEFAULT 'chromium', - `suites` int(11) DEFAULT NULL, - `tests` int(11) DEFAULT NULL, - `skipped` int(11) DEFAULT NULL, - `pending` int(11) DEFAULT NULL, - `passes` int(11) DEFAULT NULL, - `failures` int(11) DEFAULT NULL, - `broken_since_last` int(11) DEFAULT NULL, - `fixed_since_last` int(11) DEFAULT NULL, - `equal_since_last` int(11) DEFAULT NULL, - `insertion_start_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `insertion_end_date` timestamp NULL DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- -------------------------------------------------------- - --- --- Table structure for table `settings` --- - -CREATE TABLE `settings` ( - `id` int(11) NOT NULL, - `name` varchar(30) NOT NULL, - `value` text NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `settings` --- - -INSERT INTO `settings` (`id`, `name`, `value`) VALUES -(1, 'version', '3'); - --- -------------------------------------------------------- - --- --- Table structure for table `suite` --- - -CREATE TABLE `suite` ( - `id` int(11) NOT NULL, - `execution_id` int(11) NOT NULL, - `uuid` varchar(50) NOT NULL, - `title` text NOT NULL, - `campaign` varchar(40) DEFAULT NULL, - `file` varchar(200) DEFAULT NULL, - `duration` int(11) DEFAULT NULL, - `hasSkipped` tinyint(1) DEFAULT NULL, - `hasPending` tinyint(1) DEFAULT NULL, - `hasPasses` tinyint(1) DEFAULT NULL, - `hasFailures` tinyint(1) DEFAULT NULL, - `totalSkipped` int(11) DEFAULT NULL, - `totalPending` int(11) DEFAULT NULL, - `totalPasses` int(11) DEFAULT NULL, - `totalFailures` int(11) DEFAULT NULL, - `hasSuites` int(11) DEFAULT NULL, - `hasTests` int(11) DEFAULT NULL, - `parent_id` int(11) DEFAULT NULL, - `insertion_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- -------------------------------------------------------- - --- --- Table structure for table `test` --- - -CREATE TABLE `test` ( - `id` int(11) NOT NULL, - `suite_id` int(11) NOT NULL, - `uuid` varchar(50) NOT NULL, - `identifier` varchar(200) NOT NULL DEFAULT '', - `title` text NOT NULL, - `state` varchar(20) DEFAULT NULL, - `duration` int(11) NOT NULL, - `error_message` text, - `stack_trace` text, - `diff` text, - `insertion_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Indexes for table `execution` --- -ALTER TABLE `execution` - ADD PRIMARY KEY (`id`), - ADD KEY `version` (`version`); - --- --- Indexes for table `settings` --- -ALTER TABLE `settings` - ADD PRIMARY KEY (`id`); - --- --- Indexes for table `suite` --- -ALTER TABLE `suite` - ADD PRIMARY KEY (`id`), - ADD KEY `execution_id` (`execution_id`); - --- --- Indexes for table `test` --- -ALTER TABLE `test` - ADD PRIMARY KEY (`id`), - ADD KEY `state` (`state`), - ADD KEY `id` (`id`), - ADD KEY `suite_id` (`suite_id`); - --- AUTO_INCREMENT for table `execution` --- -ALTER TABLE `execution` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; --- --- AUTO_INCREMENT for table `settings` --- -ALTER TABLE `settings` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; --- --- AUTO_INCREMENT for table `suite` --- -ALTER TABLE `suite` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; --- --- AUTO_INCREMENT for table `test` --- -ALTER TABLE `test` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; - --- --- Constraints for table `suite` --- -ALTER TABLE `suite` - ADD CONSTRAINT `suite_ibfk_1` FOREIGN KEY (`execution_id`) REFERENCES `execution` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; - --- --- Constraints for table `test` --- -ALTER TABLE `test` - ADD CONSTRAINT `test_ibfk_1` FOREIGN KEY (`suite_id`) REFERENCES `suite` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;