Skip to content

Commit

Permalink
add migration
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarzin committed Dec 3, 2024
1 parent 62a5a69 commit 703e818
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ git clone --branch dev https://github.com/dbarzin/mercator
# Composer
tput setaf 2; echo "Composer update"; tput setaf 7
cd /tmp/mercator
composer update
composer install

# Drop old test database
# If it fails execute this :
Expand Down Expand Up @@ -52,8 +52,8 @@ tput setaf 2; echo "Generate application key"; tput setaf 7
php artisan key:generate

# Publush vendor packages
tput setaf 2; echo "Publish"; tput setaf 7
php artisan vendor:publish --all
#tput setaf 2; echo "Publish"; tput setaf 7
#php artisan vendor:publish --all

# Migrate and seed the database
tput setaf 2; echo "Migrate and seed the application"; tput setaf 7
Expand All @@ -64,8 +64,8 @@ tput setaf 2; echo "Insert test data"; tput setaf 7
cat ./mercator_data.sql | mysql mercator_test

# Check code quality
tput setaf 2; echo "Check code quality"; tput setaf 7
php artisan insights -s
#tput setaf 2; echo "Check code quality"; tput setaf 7
#php artisan insights -s

# Configure dusk
cp .env .env.dusk.local
Expand Down
76 changes: 76 additions & 0 deletions database/migrations/2024_11_26_130914_add_authenticity.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('networks', function (Blueprint $table) {
$table->integer('security_need_auth')->after('security_need_t')->nullable();
});

Schema::table('relations', function (Blueprint $table) {
$table->integer('security_need_auth')->after('security_need_t')->nullable();
});

Schema::table('macro_processuses', function (Blueprint $table) {
$table->integer('security_need_auth')->after('security_need_t')->nullable();
});

Schema::table('processes', function (Blueprint $table) {
$table->integer('security_need_auth')->after('security_need_t')->nullable();
});

Schema::table('m_applications', function (Blueprint $table) {
$table->integer('security_need_auth')->after('security_need_t')->nullable();
});

Schema::table('databases', function (Blueprint $table) {
$table->integer('security_need_auth')->after('security_need_t')->nullable();
});

Schema::table('information', function (Blueprint $table) {
$table->integer('security_need_auth')->after('security_need_t')->nullable();
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('networks', function (Blueprint $table) {
$table->dropColumn('security_need_auth');
});

Schema::table('relations', function (Blueprint $table) {
$table->dropColumn('security_need_auth');
});

Schema::table('macro_processuses', function (Blueprint $table) {
$table->dropColumn('security_need_auth');
});

Schema::table('processes', function (Blueprint $table) {
$table->dropColumn('security_need_auth');
});

Schema::table('m_applications', function (Blueprint $table) {
$table->dropColumn('security_need_auth');
});

Schema::table('databases', function (Blueprint $table) {
$table->dropColumn('security_need_auth');
});

Schema::table('information', function (Blueprint $table) {
$table->dropColumn('security_need_auth');
});
}
};

0 comments on commit 703e818

Please sign in to comment.