@@ -5,31 +5,31 @@ |
||
5 | 5 | |
6 | 6 | class CreateDocumentGroupsTable extends Migration { |
7 | 7 | |
8 | - /** |
|
9 | - * Run the migrations. |
|
10 | - * |
|
11 | - * @return void |
|
12 | - */ |
|
13 | - public function up() |
|
14 | - { |
|
15 | - Schema::create('document_groups', function(Blueprint $table) |
|
16 | - { |
|
17 | - $table->integer('id', true); |
|
18 | - $table->integer('document_group')->default(0)->index('document_group'); |
|
19 | - $table->integer('document')->default(0)->index('document'); |
|
20 | - $table->unique(['document_group','document'], 'ix_dg_id'); |
|
21 | - }); |
|
22 | - } |
|
8 | + /** |
|
9 | + * Run the migrations. |
|
10 | + * |
|
11 | + * @return void |
|
12 | + */ |
|
13 | + public function up() |
|
14 | + { |
|
15 | + Schema::create('document_groups', function(Blueprint $table) |
|
16 | + { |
|
17 | + $table->integer('id', true); |
|
18 | + $table->integer('document_group')->default(0)->index('document_group'); |
|
19 | + $table->integer('document')->default(0)->index('document'); |
|
20 | + $table->unique(['document_group','document'], 'ix_dg_id'); |
|
21 | + }); |
|
22 | + } |
|
23 | 23 | |
24 | 24 | |
25 | - /** |
|
26 | - * Reverse the migrations. |
|
27 | - * |
|
28 | - * @return void |
|
29 | - */ |
|
30 | - public function down() |
|
31 | - { |
|
32 | - Schema::drop('document_groups'); |
|
33 | - } |
|
25 | + /** |
|
26 | + * Reverse the migrations. |
|
27 | + * |
|
28 | + * @return void |
|
29 | + */ |
|
30 | + public function down() |
|
31 | + { |
|
32 | + Schema::drop('document_groups'); |
|
33 | + } |
|
34 | 34 | |
35 | 35 | } |
@@ -5,35 +5,35 @@ |
||
5 | 5 | |
6 | 6 | class CreateEventLogTable extends Migration { |
7 | 7 | |
8 | - /** |
|
9 | - * Run the migrations. |
|
10 | - * |
|
11 | - * @return void |
|
12 | - */ |
|
13 | - public function up() |
|
14 | - { |
|
15 | - Schema::create('event_log', function(Blueprint $table) |
|
16 | - { |
|
17 | - $table->integer('id', true); |
|
18 | - $table->integer('eventid')->nullable()->default(0); |
|
19 | - $table->integer('createdon')->default(0); |
|
20 | - $table->boolean('type')->default(1)->comment('1- information, 2 - warning, 3- error'); |
|
21 | - $table->integer('user')->default(0)->index('user')->comment('link to user table'); |
|
22 | - $table->boolean('usertype')->default(0)->comment('0 - manager, 1 - web'); |
|
23 | - $table->string('source', 50)->default(''); |
|
24 | - $table->text('description', 65535)->nullable(); |
|
25 | - }); |
|
26 | - } |
|
8 | + /** |
|
9 | + * Run the migrations. |
|
10 | + * |
|
11 | + * @return void |
|
12 | + */ |
|
13 | + public function up() |
|
14 | + { |
|
15 | + Schema::create('event_log', function(Blueprint $table) |
|
16 | + { |
|
17 | + $table->integer('id', true); |
|
18 | + $table->integer('eventid')->nullable()->default(0); |
|
19 | + $table->integer('createdon')->default(0); |
|
20 | + $table->boolean('type')->default(1)->comment('1- information, 2 - warning, 3- error'); |
|
21 | + $table->integer('user')->default(0)->index('user')->comment('link to user table'); |
|
22 | + $table->boolean('usertype')->default(0)->comment('0 - manager, 1 - web'); |
|
23 | + $table->string('source', 50)->default(''); |
|
24 | + $table->text('description', 65535)->nullable(); |
|
25 | + }); |
|
26 | + } |
|
27 | 27 | |
28 | 28 | |
29 | - /** |
|
30 | - * Reverse the migrations. |
|
31 | - * |
|
32 | - * @return void |
|
33 | - */ |
|
34 | - public function down() |
|
35 | - { |
|
36 | - Schema::drop('event_log'); |
|
37 | - } |
|
29 | + /** |
|
30 | + * Reverse the migrations. |
|
31 | + * |
|
32 | + * @return void |
|
33 | + */ |
|
34 | + public function down() |
|
35 | + { |
|
36 | + Schema::drop('event_log'); |
|
37 | + } |
|
38 | 38 | |
39 | 39 | } |
@@ -5,30 +5,30 @@ |
||
5 | 5 | |
6 | 6 | class CreateManagerUsersTable extends Migration { |
7 | 7 | |
8 | - /** |
|
9 | - * Run the migrations. |
|
10 | - * |
|
11 | - * @return void |
|
12 | - */ |
|
13 | - public function up() |
|
14 | - { |
|
15 | - Schema::create('manager_users', function(Blueprint $table) |
|
16 | - { |
|
17 | - $table->integer('id', true); |
|
18 | - $table->string('username', 100)->default('')->unique('username'); |
|
19 | - $table->string('password', 100)->default(''); |
|
20 | - }); |
|
21 | - } |
|
8 | + /** |
|
9 | + * Run the migrations. |
|
10 | + * |
|
11 | + * @return void |
|
12 | + */ |
|
13 | + public function up() |
|
14 | + { |
|
15 | + Schema::create('manager_users', function(Blueprint $table) |
|
16 | + { |
|
17 | + $table->integer('id', true); |
|
18 | + $table->string('username', 100)->default('')->unique('username'); |
|
19 | + $table->string('password', 100)->default(''); |
|
20 | + }); |
|
21 | + } |
|
22 | 22 | |
23 | 23 | |
24 | - /** |
|
25 | - * Reverse the migrations. |
|
26 | - * |
|
27 | - * @return void |
|
28 | - */ |
|
29 | - public function down() |
|
30 | - { |
|
31 | - Schema::drop('manager_users'); |
|
32 | - } |
|
24 | + /** |
|
25 | + * Reverse the migrations. |
|
26 | + * |
|
27 | + * @return void |
|
28 | + */ |
|
29 | + public function down() |
|
30 | + { |
|
31 | + Schema::drop('manager_users'); |
|
32 | + } |
|
33 | 33 | |
34 | 34 | } |
@@ -5,31 +5,31 @@ |
||
5 | 5 | |
6 | 6 | class CreateMemberGroupsTable extends Migration { |
7 | 7 | |
8 | - /** |
|
9 | - * Run the migrations. |
|
10 | - * |
|
11 | - * @return void |
|
12 | - */ |
|
13 | - public function up() |
|
14 | - { |
|
15 | - Schema::create('member_groups', function(Blueprint $table) |
|
16 | - { |
|
17 | - $table->integer('id', true); |
|
18 | - $table->integer('user_group')->default(0); |
|
19 | - $table->integer('member')->default(0); |
|
20 | - $table->unique(['user_group','member'], 'ix_group_member'); |
|
21 | - }); |
|
22 | - } |
|
8 | + /** |
|
9 | + * Run the migrations. |
|
10 | + * |
|
11 | + * @return void |
|
12 | + */ |
|
13 | + public function up() |
|
14 | + { |
|
15 | + Schema::create('member_groups', function(Blueprint $table) |
|
16 | + { |
|
17 | + $table->integer('id', true); |
|
18 | + $table->integer('user_group')->default(0); |
|
19 | + $table->integer('member')->default(0); |
|
20 | + $table->unique(['user_group','member'], 'ix_group_member'); |
|
21 | + }); |
|
22 | + } |
|
23 | 23 | |
24 | 24 | |
25 | - /** |
|
26 | - * Reverse the migrations. |
|
27 | - * |
|
28 | - * @return void |
|
29 | - */ |
|
30 | - public function down() |
|
31 | - { |
|
32 | - Schema::drop('member_groups'); |
|
33 | - } |
|
25 | + /** |
|
26 | + * Reverse the migrations. |
|
27 | + * |
|
28 | + * @return void |
|
29 | + */ |
|
30 | + public function down() |
|
31 | + { |
|
32 | + Schema::drop('member_groups'); |
|
33 | + } |
|
34 | 34 | |
35 | 35 | } |
@@ -5,31 +5,31 @@ |
||
5 | 5 | |
6 | 6 | class CreateWebGroupsTable extends Migration { |
7 | 7 | |
8 | - /** |
|
9 | - * Run the migrations. |
|
10 | - * |
|
11 | - * @return void |
|
12 | - */ |
|
13 | - public function up() |
|
14 | - { |
|
15 | - Schema::create('web_groups', function(Blueprint $table) |
|
16 | - { |
|
17 | - $table->integer('id', true); |
|
18 | - $table->integer('webgroup')->default(0); |
|
19 | - $table->integer('webuser')->default(0); |
|
20 | - $table->unique(['webgroup','webuser'], 'ix_group_user'); |
|
21 | - }); |
|
22 | - } |
|
8 | + /** |
|
9 | + * Run the migrations. |
|
10 | + * |
|
11 | + * @return void |
|
12 | + */ |
|
13 | + public function up() |
|
14 | + { |
|
15 | + Schema::create('web_groups', function(Blueprint $table) |
|
16 | + { |
|
17 | + $table->integer('id', true); |
|
18 | + $table->integer('webgroup')->default(0); |
|
19 | + $table->integer('webuser')->default(0); |
|
20 | + $table->unique(['webgroup','webuser'], 'ix_group_user'); |
|
21 | + }); |
|
22 | + } |
|
23 | 23 | |
24 | 24 | |
25 | - /** |
|
26 | - * Reverse the migrations. |
|
27 | - * |
|
28 | - * @return void |
|
29 | - */ |
|
30 | - public function down() |
|
31 | - { |
|
32 | - Schema::drop('web_groups'); |
|
33 | - } |
|
25 | + /** |
|
26 | + * Reverse the migrations. |
|
27 | + * |
|
28 | + * @return void |
|
29 | + */ |
|
30 | + public function down() |
|
31 | + { |
|
32 | + Schema::drop('web_groups'); |
|
33 | + } |
|
34 | 34 | |
35 | 35 | } |
@@ -5,34 +5,34 @@ |
||
5 | 5 | |
6 | 6 | class CreateActiveUserLocksTable extends Migration { |
7 | 7 | |
8 | - /** |
|
9 | - * Run the migrations. |
|
10 | - * |
|
11 | - * @return void |
|
12 | - */ |
|
13 | - public function up() |
|
14 | - { |
|
15 | - Schema::create('active_user_locks', function(Blueprint $table) |
|
16 | - { |
|
17 | - $table->integer('id', true); |
|
18 | - $table->string('sid', 32)->default(''); |
|
19 | - $table->integer('internalKey')->default(0); |
|
20 | - $table->integer('elementType')->default(0); |
|
21 | - $table->integer('elementId')->default(0); |
|
22 | - $table->integer('lasthit')->default(0); |
|
23 | - $table->unique(['elementType','elementId','sid'], 'ix_element_id'); |
|
24 | - }); |
|
25 | - } |
|
8 | + /** |
|
9 | + * Run the migrations. |
|
10 | + * |
|
11 | + * @return void |
|
12 | + */ |
|
13 | + public function up() |
|
14 | + { |
|
15 | + Schema::create('active_user_locks', function(Blueprint $table) |
|
16 | + { |
|
17 | + $table->integer('id', true); |
|
18 | + $table->string('sid', 32)->default(''); |
|
19 | + $table->integer('internalKey')->default(0); |
|
20 | + $table->integer('elementType')->default(0); |
|
21 | + $table->integer('elementId')->default(0); |
|
22 | + $table->integer('lasthit')->default(0); |
|
23 | + $table->unique(['elementType','elementId','sid'], 'ix_element_id'); |
|
24 | + }); |
|
25 | + } |
|
26 | 26 | |
27 | 27 | |
28 | - /** |
|
29 | - * Reverse the migrations. |
|
30 | - * |
|
31 | - * @return void |
|
32 | - */ |
|
33 | - public function down() |
|
34 | - { |
|
35 | - Schema::drop('active_user_locks'); |
|
36 | - } |
|
28 | + /** |
|
29 | + * Reverse the migrations. |
|
30 | + * |
|
31 | + * @return void |
|
32 | + */ |
|
33 | + public function down() |
|
34 | + { |
|
35 | + Schema::drop('active_user_locks'); |
|
36 | + } |
|
37 | 37 | |
38 | 38 | } |
@@ -5,37 +5,37 @@ |
||
5 | 5 | |
6 | 6 | class CreateManagerLogTable extends Migration { |
7 | 7 | |
8 | - /** |
|
9 | - * Run the migrations. |
|
10 | - * |
|
11 | - * @return void |
|
12 | - */ |
|
13 | - public function up() |
|
14 | - { |
|
15 | - Schema::create('manager_log', function(Blueprint $table) |
|
16 | - { |
|
17 | - $table->integer('id', true); |
|
18 | - $table->integer('timestamp')->default(0); |
|
19 | - $table->integer('internalKey')->default(0); |
|
20 | - $table->string('username')->nullable(); |
|
21 | - $table->integer('action')->default(0); |
|
22 | - $table->string('itemid', 10)->nullable()->default('0'); |
|
23 | - $table->string('itemname')->nullable(); |
|
24 | - $table->string('message')->default(''); |
|
25 | - $table->string('ip', 15)->nullable(); |
|
26 | - $table->string('useragent')->nullable(); |
|
27 | - }); |
|
28 | - } |
|
8 | + /** |
|
9 | + * Run the migrations. |
|
10 | + * |
|
11 | + * @return void |
|
12 | + */ |
|
13 | + public function up() |
|
14 | + { |
|
15 | + Schema::create('manager_log', function(Blueprint $table) |
|
16 | + { |
|
17 | + $table->integer('id', true); |
|
18 | + $table->integer('timestamp')->default(0); |
|
19 | + $table->integer('internalKey')->default(0); |
|
20 | + $table->string('username')->nullable(); |
|
21 | + $table->integer('action')->default(0); |
|
22 | + $table->string('itemid', 10)->nullable()->default('0'); |
|
23 | + $table->string('itemname')->nullable(); |
|
24 | + $table->string('message')->default(''); |
|
25 | + $table->string('ip', 15)->nullable(); |
|
26 | + $table->string('useragent')->nullable(); |
|
27 | + }); |
|
28 | + } |
|
29 | 29 | |
30 | 30 | |
31 | - /** |
|
32 | - * Reverse the migrations. |
|
33 | - * |
|
34 | - * @return void |
|
35 | - */ |
|
36 | - public function down() |
|
37 | - { |
|
38 | - Schema::drop('manager_log'); |
|
39 | - } |
|
31 | + /** |
|
32 | + * Reverse the migrations. |
|
33 | + * |
|
34 | + * @return void |
|
35 | + */ |
|
36 | + public function down() |
|
37 | + { |
|
38 | + Schema::drop('manager_log'); |
|
39 | + } |
|
40 | 40 | |
41 | 41 | } |
@@ -5,31 +5,31 @@ |
||
5 | 5 | |
6 | 6 | class CreateSitePluginEventsTable extends Migration { |
7 | 7 | |
8 | - /** |
|
9 | - * Run the migrations. |
|
10 | - * |
|
11 | - * @return void |
|
12 | - */ |
|
13 | - public function up() |
|
14 | - { |
|
15 | - Schema::create('site_plugin_events', function(Blueprint $table) |
|
16 | - { |
|
17 | - $table->integer('pluginid'); |
|
18 | - $table->integer('evtid')->default(0); |
|
19 | - $table->integer('priority')->default(0)->comment('determines plugin run order'); |
|
20 | - $table->primary(['pluginid','evtid']); |
|
21 | - }); |
|
22 | - } |
|
8 | + /** |
|
9 | + * Run the migrations. |
|
10 | + * |
|
11 | + * @return void |
|
12 | + */ |
|
13 | + public function up() |
|
14 | + { |
|
15 | + Schema::create('site_plugin_events', function(Blueprint $table) |
|
16 | + { |
|
17 | + $table->integer('pluginid'); |
|
18 | + $table->integer('evtid')->default(0); |
|
19 | + $table->integer('priority')->default(0)->comment('determines plugin run order'); |
|
20 | + $table->primary(['pluginid','evtid']); |
|
21 | + }); |
|
22 | + } |
|
23 | 23 | |
24 | 24 | |
25 | - /** |
|
26 | - * Reverse the migrations. |
|
27 | - * |
|
28 | - * @return void |
|
29 | - */ |
|
30 | - public function down() |
|
31 | - { |
|
32 | - Schema::drop('site_plugin_events'); |
|
33 | - } |
|
25 | + /** |
|
26 | + * Reverse the migrations. |
|
27 | + * |
|
28 | + * @return void |
|
29 | + */ |
|
30 | + public function down() |
|
31 | + { |
|
32 | + Schema::drop('site_plugin_events'); |
|
33 | + } |
|
34 | 34 | |
35 | 35 | } |
@@ -5,30 +5,30 @@ |
||
5 | 5 | |
6 | 6 | class CreateSiteModuleAccessTable extends Migration { |
7 | 7 | |
8 | - /** |
|
9 | - * Run the migrations. |
|
10 | - * |
|
11 | - * @return void |
|
12 | - */ |
|
13 | - public function up() |
|
14 | - { |
|
15 | - Schema::create('site_module_access', function(Blueprint $table) |
|
16 | - { |
|
17 | - $table->increments('id'); |
|
18 | - $table->integer('module')->default(0); |
|
19 | - $table->integer('usergroup')->default(0); |
|
20 | - }); |
|
21 | - } |
|
8 | + /** |
|
9 | + * Run the migrations. |
|
10 | + * |
|
11 | + * @return void |
|
12 | + */ |
|
13 | + public function up() |
|
14 | + { |
|
15 | + Schema::create('site_module_access', function(Blueprint $table) |
|
16 | + { |
|
17 | + $table->increments('id'); |
|
18 | + $table->integer('module')->default(0); |
|
19 | + $table->integer('usergroup')->default(0); |
|
20 | + }); |
|
21 | + } |
|
22 | 22 | |
23 | 23 | |
24 | - /** |
|
25 | - * Reverse the migrations. |
|
26 | - * |
|
27 | - * @return void |
|
28 | - */ |
|
29 | - public function down() |
|
30 | - { |
|
31 | - Schema::drop('site_module_access'); |
|
32 | - } |
|
24 | + /** |
|
25 | + * Reverse the migrations. |
|
26 | + * |
|
27 | + * @return void |
|
28 | + */ |
|
29 | + public function down() |
|
30 | + { |
|
31 | + Schema::drop('site_module_access'); |
|
32 | + } |
|
33 | 33 | |
34 | 34 | } |