Skip to content

Commit e5513c3

Browse files
committed
Adding base for scheme builder
1 parent 9325795 commit e5513c3

30 files changed

+731
-14
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ composer.lock
88
*error_log
99
/node_modules
1010
/app/config/remote.php
11-
/app/config/database.php
11+
/app/config/database.php/node_modules/node_modules

app/config/app.php

100644100755
+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
|
3939
*/
4040

41-
'url' => 'http://YOUR_SITE.com',
41+
'url' => 'scheme.riddles.nukacode.com',
4242

4343
/*
4444
|--------------------------------------------------------------------------
@@ -77,7 +77,7 @@
7777
|
7878
*/
7979

80-
'key' => 'V02hAzhfd9yh92PfWDlEgPYhnJBezvtH',
80+
'key' => 'wJDRoaJgu2gj04e7WQjr9qG4UmmcSU9W',
8181

8282
/*
8383
|--------------------------------------------------------------------------

app/config/packages/syntax/core/config.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
|
1919
| Set this to the site's control room data. Get this from stygian or riddles
2020
*/
21-
'controlRoomDetail' => 'GET_THIS_FROM_CONTROL',
21+
'controlRoomDetail' => 'scheme',
2222

2323
/*
2424
|--------------------------------------------------------------------------
@@ -30,7 +30,7 @@
3030
|
3131
*/
3232

33-
'siteName' => 'YOUR_SITE',
33+
'siteName' => 'Scheme',
3434
'siteIcon' => null,
3535

3636
/*
@@ -80,10 +80,10 @@
8080
| This variable is used to determine if the site uses the default twitter nav
8181
| bar or any form of custom menu. Set this value to the name of the blade
8282
| located in views/layouts/menus that you wish to use.
83-
| Options: twitter, utopian
83+
| Options: twitter, twitter
8484
|
8585
*/
86-
'menu' => 'utopian',
86+
'menu' => 'twitter',
8787

8888
/*
8989
|--------------------------------------------------------------------------

app/controllers/HomeController.php

+16-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@ class HomeController extends Core_HomeController {
44

55
public function getIndex()
66
{
7-
// Set up your code
7+
8+
}
9+
10+
public function getTest() {
11+
/**
12+
* Include test file then die.
13+
* this should only be accessable when debug is enabled.
14+
*/
15+
16+
if ( Config::get('app.debug') == true) {
17+
include(app_path() . '/test.php');
18+
} else {
19+
die('Debug mode must be enabled.');
20+
}
21+
22+
die;
823
}
924
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
6+
class CreateBuildObjectsTable extends Migration {
7+
8+
public function up()
9+
{
10+
Schema::create('build_objects', function(Blueprint $table) {
11+
$table->increments('id');
12+
$table->integer('buildId')->index();
13+
$table->integer('tableId')->index();
14+
$table->integer('buildTypeId');
15+
$table->string('status')->index();
16+
$table->string('filePath');
17+
$table->timestamps();
18+
$table->softDeletes();
19+
});
20+
}
21+
22+
public function down()
23+
{
24+
Schema::drop('build_objects');
25+
}
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
6+
class CreateBuildTypesTable extends Migration {
7+
8+
public function up()
9+
{
10+
Schema::create('build_types', function(Blueprint $table) {
11+
$table->increments('id');
12+
$table->string('name', 150)->index();
13+
$table->string('keyName', 150)->index();
14+
$table->timestamps();
15+
$table->softDeletes();
16+
});
17+
}
18+
19+
public function down()
20+
{
21+
Schema::drop('build_types');
22+
}
23+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
6+
class CreateBuildsTable extends Migration {
7+
8+
public function up()
9+
{
10+
Schema::create('builds', function(Blueprint $table) {
11+
$table->increments('id');
12+
$table->string('ownerId', 10)->index();
13+
$table->enum('ownerType', array('user', 'group'))->index();
14+
$table->string('creatorId', 10)->index();
15+
$table->string('projectId', 10)->index();
16+
$table->string('buildId', 10)->index();
17+
$table->integer('status')->index();
18+
$table->timestamps();
19+
$table->softDeletes();
20+
});
21+
}
22+
23+
public function down()
24+
{
25+
Schema::drop('builds');
26+
}
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
6+
class CreateColumnTypesTable extends Migration {
7+
8+
public function up()
9+
{
10+
Schema::create('column_types', function(Blueprint $table) {
11+
$table->increments('id');
12+
$table->string('name', 50);
13+
$table->string('keyName', 50);
14+
$table->timestamps();
15+
$table->softDeletes();
16+
});
17+
}
18+
19+
public function down()
20+
{
21+
Schema::drop('column_types');
22+
}
23+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
6+
class CreateColumnsTable extends Migration {
7+
8+
public function up()
9+
{
10+
Schema::create('columns', function(Blueprint $table) {
11+
$table->increments('id');
12+
$table->integer('tableId')->index();
13+
$table->string('name', 150);
14+
$table->text('description');
15+
$table->integer('typeId')->index();
16+
$table->text('defaultValue');
17+
$table->text('value');
18+
$table->text('collation');
19+
$table->enum('attribute', array('NONE', 'BINARY', 'UNSIGNED', 'UNSIGNED ZEROFILL'));
20+
$table->enum('index', array('NONE', 'INDEX', 'PRIMARY_KEY', 'UNIQUE'));
21+
$table->tinyInteger('nullableFlag')->default(0);
22+
$table->tinyInteger('autoIncrementFlag')->default(0);
23+
$table->tinyInteger('fillableFlag')->default(0);
24+
$table->tinyInteger('visibleFlag')->default(0);
25+
$table->tinyInteger('guardedFlag')->default(0);
26+
$table->tinyInteger('hiddenFlag')->default(0);
27+
$table->integer('order')->index();
28+
$table->timestamps();
29+
$table->softDeletes();
30+
});
31+
}
32+
33+
public function down()
34+
{
35+
Schema::drop('columns');
36+
}
37+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
6+
class CreateProjectsTable extends Migration {
7+
8+
public function up()
9+
{
10+
Schema::create('projects', function(Blueprint $table) {
11+
$table->increments('id');
12+
$table->string('ownerId', 10)->index();
13+
$table->enum('ownerType', array('user', 'group'))->index();
14+
$table->string('creatorId', 10)->index();
15+
$table->string('name', 150)->index();
16+
$table->tinyInteger('privateFlag')->default(0)->index();
17+
$table->timestamps();
18+
$table->softDeletes();
19+
});
20+
}
21+
22+
public function down()
23+
{
24+
Schema::drop('projects');
25+
}
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
6+
class CreateRelationshipsTable extends Migration {
7+
8+
public function up()
9+
{
10+
Schema::create('relationships', function(Blueprint $table) {
11+
$table->increments('id');
12+
$table->string('name', 150);
13+
$table->integer('localTableId')->index();
14+
$table->integer('localKeyId')->index();
15+
$table->integer('foreignTableId')->index();
16+
$table->integer('foreignKeyId')->index();
17+
$table->integer('throughTableId')->nullable()->index();
18+
$table->integer('throughKeyId')->nullable()->index();
19+
$table->integer('typeId')->index();
20+
$table->tinyInteger('namespaceFlag')->default(0);
21+
$table->string('extraMethods', 150);
22+
$table->timestamps();
23+
$table->softDeletes();
24+
});
25+
}
26+
27+
public function down()
28+
{
29+
Schema::drop('relationships');
30+
}
31+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
6+
class CreateTableSeedsTable extends Migration {
7+
8+
public function up()
9+
{
10+
Schema::create('table_seeds', function(Blueprint $table) {
11+
$table->increments('id');
12+
$table->integer('tableId')->index();
13+
$table->integer('templateId')->index();
14+
$table->string('name', 150);
15+
$table->text('data')->nullable();
16+
$table->tinyInteger('fakerFlag')->default(0);
17+
$table->integer('fakerCount')->default(0);
18+
$table->softDeletes();
19+
$table->timestamps();
20+
});
21+
}
22+
23+
public function down()
24+
{
25+
Schema::drop('table_seeds');
26+
}
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
6+
class CreateTablesTable extends Migration {
7+
8+
public function up()
9+
{
10+
Schema::create('tables', function(Blueprint $table) {
11+
$table->increments('id');
12+
$table->integer('projectId')->index();
13+
$table->string('tableName', 150)->index();
14+
$table->string('description', 150);
15+
$table->string('className', 150);
16+
$table->string('namespace', 150)->nullable();
17+
$table->tinyInteger('timestampsFlag')->default(0);
18+
$table->tinyInteger('softDeletesFlag')->default(0);
19+
$table->enum('engine', array('MyISAM', 'InnoDB'));
20+
$table->string('collation', 150);
21+
$table->string('partition', 150);
22+
$table->integer('parentId')->nullable()->index();
23+
$table->integer('tableTemplateId')->index();
24+
$table->timestamps();
25+
$table->softDeletes();
26+
});
27+
}
28+
29+
public function down()
30+
{
31+
Schema::drop('tables');
32+
}
33+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
6+
class CreateTemplatesTable extends Migration {
7+
8+
public function up()
9+
{
10+
Schema::create('templates', function(Blueprint $table) {
11+
$table->increments('id');
12+
$table->string('name', 150)->index();
13+
$table->text('data');
14+
$table->timestamps();
15+
$table->softDeletes();
16+
});
17+
}
18+
19+
public function down()
20+
{
21+
Schema::drop('templates');
22+
}
23+
}

0 commit comments

Comments
 (0)