Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gammamatrix committed Apr 27, 2024
1 parent 057450b commit 970b70e
Show file tree
Hide file tree
Showing 12 changed files with 292 additions and 101 deletions.
4 changes: 2 additions & 2 deletions database/factories/FlowFactory.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

declare(strict_types=1);
/**
* Playground
*/

declare(strict_types=1);
namespace Database\Factories\Playground\Matrix\Models;

use Illuminate\Database\Eloquent\Factories\Factory;
Expand Down
4 changes: 2 additions & 2 deletions database/factories/MilestoneFactory.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

declare(strict_types=1);
/**
* Playground
*/

declare(strict_types=1);
namespace Database\Factories\Playground\Matrix\Models;

use Illuminate\Database\Eloquent\Factories\Factory;
Expand Down
47 changes: 21 additions & 26 deletions database/migrations/2020_01_02_100001_create_matrix_flows_table.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
<?php

declare(strict_types=1);
/**
* Playground
*/

declare(strict_types=1);

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

/**
* \Playground\Matrix\Models\Flow
*/
return new class() extends Migration
{
/**
Expand All @@ -18,6 +21,7 @@
public function up(): void
{
Schema::create('matrix_flows', function (Blueprint $table) {

// Primary key

$table->uuid('id')->primary();
Expand All @@ -44,14 +48,8 @@ public function up(): void
$table->dateTime('planned_start_at')->nullable();
$table->dateTime('end_at')->nullable()->index();
$table->dateTime('planned_end_at')->nullable();
$table->dateTime('canceled_at')->nullable();
$table->dateTime('closed_at')->nullable()->index();
$table->dateTime('embargo_at')->nullable();
$table->dateTime('fixed_at')->nullable();
$table->dateTime('postponed_at')->nullable();
$table->dateTime('published_at')->nullable();
$table->dateTime('released_at')->nullable();
$table->dateTime('resolved_at')->nullable();
$table->dateTime('resumed_at')->nullable();
$table->dateTime('suspended_at')->nullable();

Expand All @@ -78,48 +76,41 @@ public function up(): void
$table->bigInteger('x')->nullable();
$table->bigInteger('y')->nullable();
$table->bigInteger('z')->nullable();
$table->decimal('r', 65, 10)->nullable()->default(null);
$table->decimal('theta', 10, 6)->nullable()->default(null);
$table->decimal('rho', 10, 6)->nullable()->default(null);
$table->decimal('phi', 10, 6)->nullable()->default(null);
$table->decimal('elevation', 65, 10)->nullable()->default(null);
$table->decimal('latitude', 8, 6)->nullable()->default(null);
$table->decimal('longitude', 9, 6)->nullable()->default(null);
$table->decimal('r', 65, 10)->nullable();
$table->decimal('theta', 10, 6)->nullable();
$table->decimal('rho', 10, 6)->nullable();
$table->decimal('phi', 10, 6)->nullable();
$table->decimal('elevation', 65, 10)->nullable();
$table->decimal('latitude', 8, 6)->nullable();
$table->decimal('longitude', 9, 6)->nullable();

// Flags

$table->boolean('active')->default(1)->index();
$table->boolean('canceled')->default(0);
$table->boolean('closed')->default(0);
$table->boolean('completed')->default(0);
$table->boolean('duplicate')->default(0);
$table->boolean('fixed')->default(0);
$table->boolean('cron')->default(0)->index();
$table->boolean('flagged')->default(0);
$table->boolean('internal')->default(0);
$table->boolean('locked')->default(0);
$table->boolean('pending')->default(0);
$table->boolean('planned')->default(0);
$table->boolean('problem')->default(0);
$table->boolean('published')->default(0);
$table->boolean('released')->default(0);
$table->boolean('retired')->default(0);
$table->boolean('resolved')->default(0);
$table->boolean('suspended')->default(0);
$table->boolean('unknown')->default(0);

// Strings
// Columns

$table->string('label')->default('');
$table->string('title')->default('');
$table->string('byline')->default('');
$table->string('slug')->nullable()->default(null)->index();
$table->string('slug')->nullable()->index();
$table->string('url')->default('');
$table->string('description')->default('');
$table->string('introduction')->default('');
$table->mediumText('content')->nullable();
$table->mediumText('summary')->nullable();

// UI
// Ui

$table->string('icon')->default('');
$table->string('image')->default('');
Expand All @@ -133,6 +124,10 @@ public function up(): void
$table->json('meta')->nullable()->default(new Expression('(JSON_OBJECT())'));
$table->json('notes')->nullable()->default(new Expression('(JSON_ARRAY())'))->comment('Array of note objects');
$table->json('options')->nullable()->default(new Expression('(JSON_OBJECT())'));
$table->json('backlog')->nullable()->default(new Expression('(JSON_OBJECT())'));
$table->json('board')->nullable()->default(new Expression('(JSON_OBJECT())'));
$table->json('roadmap')->nullable()->default(new Expression('(JSON_OBJECT())'));
$table->json('sources')->nullable()->default(new Expression('(JSON_OBJECT())'));
});
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
<?php

declare(strict_types=1);
/**
* Playground
*/

declare(strict_types=1);

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

/**
* \Playground\Matrix\Models\Milestone
*/
return new class() extends Migration
{
/**
Expand All @@ -18,6 +21,7 @@
public function up(): void
{
Schema::create('matrix_milestones', function (Blueprint $table) {

// Primary key

$table->uuid('id')->primary();
Expand Down Expand Up @@ -62,8 +66,8 @@ public function up(): void
$table->dateTime('postponed_at')->nullable();
$table->dateTime('published_at')->nullable();
$table->dateTime('released_at')->nullable();
$table->dateTime('resumed_at')->nullable();
$table->dateTime('resolved_at')->nullable()->index();
$table->dateTime('resumed_at')->nullable();
$table->dateTime('suspended_at')->nullable();

// Permissions
Expand All @@ -89,20 +93,21 @@ public function up(): void
$table->bigInteger('x')->nullable();
$table->bigInteger('y')->nullable();
$table->bigInteger('z')->nullable();
$table->decimal('r', 65, 10)->nullable()->default(null);
$table->decimal('theta', 10, 6)->nullable()->default(null);
$table->decimal('rho', 10, 6)->nullable()->default(null);
$table->decimal('phi', 10, 6)->nullable()->default(null);
$table->decimal('elevation', 65, 10)->nullable()->default(null);
$table->decimal('latitude', 8, 6)->nullable()->default(null);
$table->decimal('longitude', 9, 6)->nullable()->default(null);
$table->decimal('r', 65, 10)->nullable();
$table->decimal('theta', 10, 6)->nullable();
$table->decimal('rho', 10, 6)->nullable();
$table->decimal('phi', 10, 6)->nullable();
$table->decimal('elevation', 65, 10)->nullable();
$table->decimal('latitude', 8, 6)->nullable();
$table->decimal('longitude', 9, 6)->nullable();

// Flags

$table->boolean('active')->default(1)->index();
$table->boolean('canceled')->default(0);
$table->boolean('closed')->default(0);
$table->boolean('completed')->default(0);
$table->boolean('cron')->default(0)->index();
$table->boolean('duplicate')->default(0);
$table->boolean('fixed')->default(0);
$table->boolean('flagged')->default(0);
Expand All @@ -118,19 +123,19 @@ public function up(): void
$table->boolean('suspended')->default(0);
$table->boolean('unknown')->default(0);

// Strings
// Columns

$table->string('label')->default('');
$table->string('title')->default('');
$table->string('byline')->default('');
$table->string('slug')->nullable()->default(null)->index();
$table->string('slug')->nullable()->index();
$table->string('url')->default('');
$table->string('description')->default('');
$table->string('introduction')->default('');
$table->mediumText('content')->nullable();
$table->mediumText('summary')->nullable();

// UI
// Ui

$table->string('icon')->default('');
$table->string('image')->default('');
Expand Down
Loading

0 comments on commit 970b70e

Please sign in to comment.