update for version 1.0.2
This commit is contained in:
1
code/database/.gitignore
vendored
Normal file
1
code/database/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.sqlite
|
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateCategoriesTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up() {
|
||||
Schema::create('category', function (Blueprint $table) {
|
||||
$table->increments('id')->unsigned();
|
||||
$table->string('name');
|
||||
$table->string('slug');
|
||||
$table->string('description');
|
||||
$table->boolean('status');
|
||||
$table->integer('parent');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down() {
|
||||
Schema::drop('categories');
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateArticlesTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up() {
|
||||
Schema::create('article', function (Blueprint $table) {
|
||||
$table->increments('id')->unsigned();
|
||||
$table->string('name');
|
||||
$table->string('slug');
|
||||
$table->text('description');
|
||||
$table->boolean('status');
|
||||
$table->boolean('type');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down() {
|
||||
Schema::drop('articles');
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateSettingsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up() {
|
||||
Schema::create('settings', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('company_name');
|
||||
$table->string('phone');
|
||||
$table->string('website');
|
||||
$table->string('address');
|
||||
$table->string('logo');
|
||||
$table->string('background');
|
||||
$table->string('version');
|
||||
$table->string('port');
|
||||
$table->string('host');
|
||||
$table->string('encryption');
|
||||
$table->string('email');
|
||||
$table->string('password');
|
||||
$table->integer('pagination');
|
||||
$table->string('timezone');
|
||||
$table->string('dateformat');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down() {
|
||||
Schema::drop('settings');
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateArticleRelationshipsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up() {
|
||||
Schema::create('article_relationship', function (Blueprint $table) {
|
||||
$table->increments('id')->unsigned();
|
||||
$table->integer('article_id')->unsigned();
|
||||
$table->foreign('article_id')->references('id')->on('article');
|
||||
$table->integer('category_id')->unsigned();
|
||||
$table->foreign('category_id')->references('id')->on('category');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down() {
|
||||
Schema::drop('article_relationship');
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateFaqsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up() {
|
||||
Schema::create('faqs', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down() {
|
||||
Schema::drop('faqs');
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateContactsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up() {
|
||||
Schema::create('contact', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->string('email');
|
||||
$table->string('subject');
|
||||
$table->string('message');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down() {
|
||||
Schema::drop('contacts');
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateCommentsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up() {
|
||||
Schema::create('comment', function (Blueprint $table) {
|
||||
$table->increments('id')->unsigned();
|
||||
$table->integer('article_id')->unsigned();
|
||||
$table->foreign('article_id')->references('id')->on('article');
|
||||
$table->string('name');
|
||||
$table->string('email');
|
||||
$table->string('website');
|
||||
$table->string('comment');
|
||||
$table->boolean('status');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down() {
|
||||
Schema::drop('comments');
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreatePagesTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up() {
|
||||
Schema::create('pages', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->boolean('status');
|
||||
$table->boolean('visibility');
|
||||
$table->string('slug');
|
||||
$table->text('description');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down() {
|
||||
Schema::drop('pages');
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateOptionsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up() {
|
||||
Schema::create('options', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->text('option_name');
|
||||
$table->text('option_value');
|
||||
$table->text('autoload');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down() {
|
||||
Schema::drop('options');
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateSocialsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up() {
|
||||
Schema::create('social', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('linkedin');
|
||||
$table->string('stumble');
|
||||
$table->string('google');
|
||||
$table->string('deviantart');
|
||||
$table->string('flickr');
|
||||
$table->string('skype');
|
||||
$table->string('rss');
|
||||
$table->string('twitter');
|
||||
$table->string('facebook');
|
||||
$table->string('youtube');
|
||||
$table->string('vimeo');
|
||||
$table->string('pinterest');
|
||||
$table->string('dribbble');
|
||||
$table->string('instagram');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down() {
|
||||
Schema::drop('social');
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateSideTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('side1', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('title');
|
||||
$table->string('content');
|
||||
$table->timestamps();
|
||||
});
|
||||
Schema::create('side2', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('title');
|
||||
$table->string('content');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('side1');
|
||||
Schema::drop('side2');
|
||||
}
|
||||
|
||||
}
|
@@ -33,7 +33,14 @@ use App\Model\helpdesk\Theme\Footer3;
|
||||
use App\Model\helpdesk\Theme\Footer4;
|
||||
use App\Model\helpdesk\Email\Smtp;
|
||||
use App\Model\helpdesk\Utility\Version_Check;
|
||||
use App\Model\kb\Options;
|
||||
|
||||
// Knowledge base
|
||||
|
||||
use App\Model\kb\Social;
|
||||
use App\Model\kb\Side1;
|
||||
use App\Model\kb\Side2;
|
||||
use App\Model\kb\Settings;
|
||||
|
||||
class DatabaseSeeder extends Seeder {
|
||||
|
||||
@@ -291,5 +298,42 @@ class DatabaseSeeder extends Seeder {
|
||||
|
||||
Version_Check::create(['id'=>'1']);
|
||||
|
||||
|
||||
$option = array(
|
||||
|
||||
'gmt_offset',
|
||||
'date_format',
|
||||
'time_format',
|
||||
'date_time_format',
|
||||
'sitename',
|
||||
'sitedescription',
|
||||
'admin_email',
|
||||
'template',
|
||||
'upload_url_path',
|
||||
'timezone_string',
|
||||
'siteurl',
|
||||
'home',
|
||||
'start_of_week',
|
||||
'language',
|
||||
'port',
|
||||
'host',
|
||||
'encryption',
|
||||
'username',
|
||||
'password',
|
||||
'footer',
|
||||
'uselogo',
|
||||
'logo',
|
||||
|
||||
);
|
||||
|
||||
foreach ($option as $name) {
|
||||
Options::create(array('option_name' => $name));
|
||||
}
|
||||
|
||||
Social::create(['id'=>'1']);
|
||||
Side1::create(['id'=>'1']);
|
||||
Side2::create(['id'=>'1']);
|
||||
Settings::create(['id'=>'id','paagination' => '10']);
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user