Skip to content

Commit

Permalink
Make clean installation possible.
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitexus committed Apr 26, 2024
1 parent 80cfe85 commit 55f98bc
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 25 deletions.
4 changes: 2 additions & 2 deletions db/migrations/20200413150836_app_to_company.php
Expand Up @@ -8,8 +8,8 @@ class AppToCompany extends AbstractMigration {
*/
public function change() {
$table = $this->table('appcompany');
$table->addColumn('app_id', 'integer', ['null' => false])
->addColumn('company_id', 'integer', ['null' => false])
$table->addColumn('app_id', 'integer', ['null' => false, 'unsigned'=>false])
->addColumn('company_id', 'integer', ['null' => false, 'unsigned'=>false])
->addColumn('interval','string',['length'=>1])
->addIndex(['app_id', 'company_id'])
->addForeignKey('app_id', 'apps', ['id'], ['constraint' => 'a2p-app_must_exist'])
Expand Down
6 changes: 3 additions & 3 deletions db/migrations/20200520140331_config_registry.php
Expand Up @@ -6,7 +6,7 @@ class ConfigRegistry extends AbstractMigration {

public function change() {
$customFields = $this->table('conffield');
$customFields->addColumn('app_id', 'integer', ['null' => false])
$customFields->addColumn('app_id', 'integer', ['null' => false, 'unsigned'=>false])
->addColumn('keyname', 'string', ['length' => 64])
->addColumn('type', 'string', ['length' => 32])
->addColumn('description', 'string', ['length' => 1024])
Expand All @@ -16,8 +16,8 @@ public function change() {
$customFields->create();

$configs = $this->table('configuration');
$configs->addColumn('app_id', 'integer', ['null' => false])
->addColumn('company_id', 'integer', ['null' => false])
$configs->addColumn('app_id', 'integer', ['null' => false, 'unsigned'=>false])
->addColumn('company_id', 'integer', ['null' => false, 'unsigned'=>false])
->addColumn('key', 'string', ['length' => 64])
->addColumn('value', 'string', ['length' => 1024])
->addIndex(['app_id', 'company_id', 'key'], ['unique' => true])
Expand Down
15 changes: 7 additions & 8 deletions db/migrations/20221123091933_company_env.php
@@ -1,10 +1,11 @@
<?php

declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class CompanyEnv extends AbstractMigration
{
final class CompanyEnv extends AbstractMigration {

/**
* Change Method.
*
Expand All @@ -16,15 +17,13 @@ final class CompanyEnv extends AbstractMigration
* Remember to call "create()" or "update()" and NOT "save()" when working
* with the Table class.
*/
public function change()
{
public function change() {
$table = $this->table('companyenv');
$table->addColumn('keyword', 'string', array('null' => false))
->addColumn('value', 'string', array('null' => false))
->addColumn('company_id', 'integer', ['null' => false])
->addIndex(['keyword', 'company_id'], ['unique' => true])
->addForeignKey('company_id', 'company', ['id'], ['constraint' => 'env-company_must_exist']);
->addColumn('company_id', 'integer', ['null' => false, 'unsigned'=>false])
->addIndex(['keyword', 'company_id'], ['unique' => true])
->addForeignKey('company_id', 'company', ['id'], ['constraint' => 'env-company_must_exist']);
$table->save();

}
}
12 changes: 4 additions & 8 deletions db/migrations/20221125095601_job.php
Expand Up @@ -19,17 +19,13 @@ final class Job extends AbstractMigration {
*/
public function change() {
$table = $this->table('job');
$table->addColumn('app_id', 'integer', ['null' => false])
$table->addColumn('app_id', 'integer', ['null' => false, 'unsigned' => false])
->addColumn('begin', 'datetime', ['default' => 'CURRENT_TIMESTAMP'])
->addColumn('end', 'datetime', ['null' => true])
->addColumn('company_id', 'integer', ['null' => false])
->addColumn('company_id', 'integer', ['null' => false, 'unsigned'=>false])
->addColumn('exitcode', 'integer', ['null' => true])
->addForeignKey('app_id', 'apps', ['id'],
['constraint' => 'job-app_must_exist'])
->addForeignKey('company_id', 'company', ['id'],
['constraint' => 'job-company_must_exist']);
->addForeignKey('app_id', 'apps', ['id'], ['constraint' => 'job-app_must_exist'])
->addForeignKey('company_id', 'company', ['id'], ['constraint' => 'job-company_must_exist']);
$table->save();

}

}
4 changes: 2 additions & 2 deletions db/migrations/20231112224941_company_apps.php
Expand Up @@ -21,8 +21,8 @@ public function change(): void
{

$table = $this->table('companyapp');
$table->addColumn('app_id', 'integer', ['null' => false])
->addColumn('company_id', 'integer', ['null' => false])
$table->addColumn('app_id', 'integer', ['null' => false, 'unsigned'=>false])
->addColumn('company_id', 'integer', ['null' => false, 'unsigned'=>false])
->addIndex(['app_id', 'company_id'], ['unique' => true])
->addForeignKey('app_id', 'apps', ['id'], ['constraint' => 'a2c-app_must_exist'])
->addForeignKey('company_id', 'company', ['id'], ['constraint' => 'a2c-company_must_exist']);
Expand Down
2 changes: 1 addition & 1 deletion db/migrations/20240107205916_action_config.php
Expand Up @@ -26,7 +26,7 @@ public function change(): void
->addColumn('keyname', 'string', ['comment' => 'Configuration Key name'])
->addColumn('value', 'string', ['comment' => 'Configuration Value'])
->addColumn('mode', 'string', ['null' => true, 'length' => 10, 'default' => null, 'comment' => 'success, fail or empty'])
->addColumn('runtemplate_id', 'integer', ['null' => false])
->addColumn('runtemplate_id', 'integer', ['null' => false, 'unsigned'=>false])
->addIndex(['module', 'keyname', 'mode', 'runtemplate_id'], ['unique' => true])
->addForeignKey('runtemplate_id', 'runtemplate', ['id'], ['constraint' => 'runtemplate_must_exist'])
->create();
Expand Down
2 changes: 1 addition & 1 deletion tests/multiflexi_probe.multiflexi.app.json
Expand Up @@ -10,7 +10,7 @@
"homepage": "https://github.com/VitexSoftware/MultiFlexi",
"ociimage": "docker.io/vitexsoftware/multiflexi-probe",
"uuid": "775ed801-2489-4981-bc14-d8a01cba1938",
"topics": "MultiFlexi,probe,task launcher,testing,tool,👁‍🗨",
"topics": "MultiFlexi,probe,task launcher,testing,tool",
"version": "0.1.0",
"environment": {
"FILE_UPLOAD": {
Expand Down

0 comments on commit 55f98bc

Please sign in to comment.