Commit d57eb3b3 authored by Viral Solani's avatar Viral Solani Committed by StyleCI Bot

Apply fixes from StyleCI

parent 08886a16
......@@ -3,36 +3,33 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateBlogCategoriesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('blog_categories', function(Blueprint $table)
{
$table->increments('id');
$table->string('name', 191);
$table->boolean('status')->default(1);
$table->integer('created_by')->unsigned();
$table->integer('updated_by')->unsigned()->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('blog_categories');
}
class CreateBlogCategoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('blog_categories', function (Blueprint $table) {
$table->increments('id');
$table->string('name', 191);
$table->boolean('status')->default(1);
$table->integer('created_by')->unsigned();
$table->integer('updated_by')->unsigned()->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('blog_categories');
}
}
......@@ -3,32 +3,29 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateBlogMapCategoriesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('blog_map_categories', function(Blueprint $table)
{
$table->increments('id');
$table->integer('blog_id')->unsigned()->index();
$table->integer('category_id')->unsigned()->index();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('blog_map_categories');
}
class CreateBlogMapCategoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('blog_map_categories', function (Blueprint $table) {
$table->increments('id');
$table->integer('blog_id')->unsigned()->index();
$table->integer('category_id')->unsigned()->index();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('blog_map_categories');
}
}
......@@ -3,32 +3,29 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateBlogMapTagsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('blog_map_tags', function(Blueprint $table)
{
$table->increments('id');
$table->integer('blog_id')->unsigned()->index();
$table->integer('tag_id')->unsigned()->index();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('blog_map_tags');
}
class CreateBlogMapTagsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('blog_map_tags', function (Blueprint $table) {
$table->increments('id');
$table->integer('blog_id')->unsigned()->index();
$table->integer('tag_id')->unsigned()->index();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('blog_map_tags');
}
}
......@@ -3,36 +3,33 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateBlogTagsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('blog_tags', function(Blueprint $table)
{
$table->increments('id');
$table->string('name', 191);
$table->boolean('status')->default(1);
$table->integer('created_by')->unsigned();
$table->integer('updated_by')->unsigned()->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('blog_tags');
}
class CreateBlogTagsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('blog_tags', function (Blueprint $table) {
$table->increments('id');
$table->string('name', 191);
$table->boolean('status')->default(1);
$table->integer('created_by')->unsigned();
$table->integer('updated_by')->unsigned()->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('blog_tags');
}
}
......@@ -3,44 +3,41 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateBlogsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('blogs', function(Blueprint $table)
{
$table->increments('id');
$table->string('name', 191);
$table->dateTime('publish_datetime');
$table->string('featured_image', 191);
$table->text('content');
$table->string('meta_title', 191)->nullable();
$table->string('cannonical_link', 191)->nullable();
$table->string('slug', 191)->nullable();
$table->text('meta_description', 65535)->nullable();
$table->text('meta_keywords', 65535)->nullable();
$table->enum('status', array('Published','Draft','InActive','Scheduled'));
$table->integer('created_by')->unsigned();
$table->integer('updated_by')->unsigned()->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('blogs');
}
class CreateBlogsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('blogs', function (Blueprint $table) {
$table->increments('id');
$table->string('name', 191);
$table->dateTime('publish_datetime');
$table->string('featured_image', 191);
$table->text('content');
$table->string('meta_title', 191)->nullable();
$table->string('cannonical_link', 191)->nullable();
$table->string('slug', 191)->nullable();
$table->text('meta_description', 65535)->nullable();
$table->text('meta_keywords', 65535)->nullable();
$table->enum('status', ['Published', 'Draft', 'InActive', 'Scheduled']);
$table->integer('created_by')->unsigned();
$table->integer('updated_by')->unsigned()->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('blogs');
}
}
......@@ -3,33 +3,30 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateCitiesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('cities', function(Blueprint $table)
{
$table->increments('id');
$table->integer('state_id')->unsigned()->index();
$table->string('city', 191);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('cities');
}
class CreateCitiesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('cities', function (Blueprint $table) {
$table->increments('id');
$table->integer('state_id')->unsigned()->index();
$table->string('city', 191);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('cities');
}
}
......@@ -3,42 +3,39 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateCmsPagesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('cms_pages', function(Blueprint $table)
{
$table->increments('id');
$table->string('title', 191);
$table->string('page_slug', 191)->unique();
$table->text('description', 65535)->nullable();
$table->string('cannonical_link', 191)->nullable();
$table->string('seo_title', 191)->nullable();
$table->string('seo_keyword', 191)->nullable();
$table->text('seo_description', 65535)->nullable();
$table->boolean('status')->default(1);
$table->integer('created_by')->unsigned();
$table->integer('updated_by')->unsigned()->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('cms_pages');
}
class CreateCmsPagesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('cms_pages', function (Blueprint $table) {
$table->increments('id');
$table->string('title', 191);
$table->string('page_slug', 191)->unique();
$table->text('description', 65535)->nullable();
$table->string('cannonical_link', 191)->nullable();
$table->string('seo_title', 191)->nullable();
$table->string('seo_keyword', 191)->nullable();
$table->text('seo_description', 65535)->nullable();
$table->boolean('status')->default(1);
$table->integer('created_by')->unsigned();
$table->integer('updated_by')->unsigned()->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('cms_pages');
}
}
......@@ -3,32 +3,29 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateCountriesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('countries', function(Blueprint $table)
{
$table->increments('id');
$table->string('country', 191);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('countries');
}
class CreateCountriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('countries', function (Blueprint $table) {
$table->increments('id');
$table->string('country', 191);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('countries');
}
}
......@@ -3,32 +3,29 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateEmailTemplatePlaceholdersTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('email_template_placeholders', function(Blueprint $table)
{
$table->increments('id');
$table->string('name', 191);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('email_template_placeholders');
}
class CreateEmailTemplatePlaceholdersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('email_template_placeholders', function (Blueprint $table) {
$table->increments('id');
$table->string('name', 191);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('email_template_placeholders');
}
}
......@@ -3,32 +3,29 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateEmailTemplateTypesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('email_template_types', function(Blueprint $table)
{
$table->increments('id');
$table->string('name', 191);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('email_template_types');
}
class CreateEmailTemplateTypesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('email_template_types', function (Blueprint $table) {
$table->increments('id');
$table->string('name', 191);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('email_template_types');
}
}
......@@ -3,39 +3,36 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateEmailTemplatesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('email_templates', function(Blueprint $table)
{
$table->increments('id');
$table->integer('type_id')->unsigned()->index();
$table->string('title');
$table->string('subject');
$table->text('body', 65535);
$table->boolean('status')->default(1);
$table->integer('created_by')->unsigned();
$table->integer('updated_by')->unsigned()->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('email_templates');
}
class CreateEmailTemplatesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('email_templates', function (Blueprint $table) {
$table->increments('id');
$table->integer('type_id')->unsigned()->index();
$table->string('title');
$table->string('subject');
$table->text('body', 65535);
$table->boolean('status')->default(1);
$table->integer('created_by')->unsigned();
$table->integer('updated_by')->unsigned()->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('email_templates');
}
}
......@@ -3,35 +3,32 @@
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->string('question', 191);
$table->text('answer', 65535);
$table->boolean('status')->default(0);
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('faqs');
}
class CreateFaqsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('faqs', function (Blueprint $table) {
$table->increments('id');
$table->string('question', 191);
$table->text('answer', 65535);
$table->boolean('status')->default(0);
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('faqs');
}
}
......@@ -3,38 +3,35 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateHistoryTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('history', function(Blueprint $table)
{
$table->increments('id');
$table->integer('type_id')->unsigned()->index('history_type_id_foreign');
$table->integer('user_id')->unsigned()->index('history_user_id_foreign');
$table->integer('entity_id')->unsigned()->nullable();
$table->string('icon', 191)->nullable();
$table->string('class', 191)->nullable();
$table->string('text', 191);
$table->text('assets', 65535)->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('history');
}
class CreateHistoryTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('history', function (Blueprint $table) {
$table->increments('id');
$table->integer('type_id')->unsigned()->index('history_type_id_foreign');
$table->integer('user_id')->unsigned()->index('history_user_id_foreign');
$table->integer('entity_id')->unsigned()->nullable();
$table->string('icon', 191)->nullable();
$table->string('class', 191)->nullable();
$table->string('text', 191);
$table->text('assets', 65535)->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('history');
}
}
......@@ -3,32 +3,29 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateHistoryTypesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('history_types', function(Blueprint $table)
{
$table->increments('id');
$table->string('name', 191);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('history_types');
}
class CreateHistoryTypesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('history_types', function (Blueprint $table) {
$table->increments('id');
$table->string('name', 191);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('history_types');
}
}
......@@ -3,37 +3,34 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateMenusTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('menus', function(Blueprint $table)
{
$table->increments('id');
$table->enum('type', array('backend','frontend'));
$table->string('name', 191);
$table->text('items', 65535)->nullable();
$table->integer('created_by')->unsigned();
$table->integer('updated_by')->unsigned()->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('menus');
}
class CreateMenusTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('menus', function (Blueprint $table) {
$table->increments('id');
$table->enum('type', ['backend', 'frontend']);
$table->string('name', 191);
$table->text('items', 65535)->nullable();
$table->integer('created_by')->unsigned();
$table->integer('updated_by')->unsigned()->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('menus');
}
}
......@@ -3,36 +3,33 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateModulesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('modules', function(Blueprint $table)
{
$table->increments('id');
$table->string('view_permission_id', 191);
$table->string('name', 191);
$table->string('url', 191)->nullable()->comment('view_route');
$table->integer('created_by')->unsigned();
$table->integer('updated_by')->unsigned()->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('modules');
}
class CreateModulesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('modules', function (Blueprint $table) {
$table->increments('id');
$table->string('view_permission_id', 191);
$table->string('name', 191);
$table->string('url', 191)->nullable()->comment('view_route');
$table->integer('created_by')->unsigned();
$table->integer('updated_by')->unsigned()->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('modules');
}
}
......@@ -3,35 +3,32 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateNotificationsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('notifications', function(Blueprint $table)
{
$table->increments('id');
$table->string('message', 191);
$table->integer('user_id')->unsigned()->index('notifications_user_id_foreign');
$table->boolean('type')->default(1)->comment('1 - Dashboard , 2 - Email , 3 - Both');
$table->boolean('is_read')->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('notifications');
}
class CreateNotificationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('notifications', function (Blueprint $table) {
$table->increments('id');
$table->string('message', 191);
$table->integer('user_id')->unsigned()->index('notifications_user_id_foreign');
$table->boolean('type')->default(1)->comment('1 - Dashboard , 2 - Email , 3 - Both');
$table->boolean('is_read')->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('notifications');
}
}
......@@ -3,32 +3,29 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreatePasswordResetsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('password_resets', function(Blueprint $table)
{
$table->string('email', 191)->index();
$table->string('token', 191);
$table->dateTime('created_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('password_resets');
}
class CreatePasswordResetsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('password_resets', function (Blueprint $table) {
$table->string('email', 191)->index();
$table->string('token', 191);
$table->dateTime('created_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('password_resets');
}
}
......@@ -3,32 +3,29 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreatePermissionRoleTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('permission_role', function(Blueprint $table)
{
$table->increments('id');
$table->integer('permission_id')->unsigned()->index('permission_role_permission_id_foreign');
$table->integer('role_id')->unsigned()->index('permission_role_role_id_foreign');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('permission_role');
}
class CreatePermissionRoleTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('permission_role', function (Blueprint $table) {
$table->increments('id');
$table->integer('permission_id')->unsigned()->index('permission_role_permission_id_foreign');
$table->integer('role_id')->unsigned()->index('permission_role_role_id_foreign');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('permission_role');
}
}
......@@ -3,32 +3,29 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreatePermissionUserTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('permission_user', function(Blueprint $table)
{
$table->increments('id');
$table->integer('permission_id')->unsigned()->index('permission_user_permission_id_foreign');
$table->integer('user_id')->unsigned()->index('permission_user_user_id_foreign');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('permission_user');
}
class CreatePermissionUserTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('permission_user', function (Blueprint $table) {
$table->increments('id');
$table->integer('permission_id')->unsigned()->index('permission_user_permission_id_foreign');
$table->integer('user_id')->unsigned()->index('permission_user_user_id_foreign');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('permission_user');
}
}
......@@ -3,38 +3,35 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreatePermissionsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('permissions', function(Blueprint $table)
{
$table->increments('id');
$table->string('name', 191)->unique();
$table->string('display_name', 191);
$table->smallInteger('sort')->unsigned()->default(0);
$table->boolean('status')->default(1);
$table->integer('created_by')->unsigned();
$table->integer('updated_by')->unsigned()->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('permissions');
}
class CreatePermissionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('permissions', function (Blueprint $table) {
$table->increments('id');
$table->string('name', 191)->unique();
$table->string('display_name', 191);
$table->smallInteger('sort')->unsigned()->default(0);
$table->boolean('status')->default(1);
$table->integer('created_by')->unsigned();
$table->integer('updated_by')->unsigned()->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('permissions');
}
}
......@@ -3,32 +3,29 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateRoleUserTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('role_user', function(Blueprint $table)
{
$table->increments('id');
$table->integer('user_id')->unsigned()->index('role_user_user_id_foreign');
$table->integer('role_id')->unsigned()->index('role_user_role_id_foreign');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('role_user');
}
class CreateRoleUserTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('role_user', function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id')->unsigned()->index('role_user_user_id_foreign');
$table->integer('role_id')->unsigned()->index('role_user_role_id_foreign');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('role_user');
}
}
......@@ -3,38 +3,35 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateRolesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('roles', function(Blueprint $table)
{
$table->increments('id');
$table->string('name', 191)->unique();
$table->boolean('all')->default(0);
$table->smallInteger('sort')->unsigned()->default(0);
$table->boolean('status')->default(1);
$table->integer('created_by')->unsigned();
$table->integer('updated_by')->unsigned()->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('roles');
}
class CreateRolesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('roles', function (Blueprint $table) {
$table->increments('id');
$table->string('name', 191)->unique();
$table->boolean('all')->default(0);
$table->smallInteger('sort')->unsigned()->default(0);
$table->boolean('status')->default(1);
$table->integer('created_by')->unsigned();
$table->integer('updated_by')->unsigned()->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('roles');
}
}
......@@ -3,35 +3,32 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSessionsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('sessions', function(Blueprint $table)
{
$table->string('id', 191)->unique();
$table->integer('user_id')->unsigned()->nullable();
$table->string('ip_address', 45)->nullable();
$table->text('user_agent', 65535)->nullable();
$table->text('payload', 65535);
$table->integer('last_activity');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('sessions');
}
class CreateSessionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('sessions', function (Blueprint $table) {
$table->string('id', 191)->unique();
$table->integer('user_id')->unsigned()->nullable();
$table->string('ip_address', 45)->nullable();
$table->text('user_agent', 65535)->nullable();
$table->text('payload', 65535);
$table->integer('last_activity');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('sessions');
}
}
......@@ -3,57 +3,54 @@
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('logo', 191)->nullable();
$table->string('favicon', 191)->nullable();
$table->string('seo_title', 191)->nullable();
$table->text('seo_keyword', 65535)->nullable();
$table->text('seo_description', 65535)->nullable();
$table->string('company_contact', 191)->nullable();
$table->text('company_address', 65535)->nullable();
$table->string('from_name', 191)->nullable();
$table->string('from_email', 191)->nullable();
$table->string('facebook', 191)->nullable();
$table->string('linkedin', 191)->nullable();
$table->string('twitter', 191)->nullable();
$table->string('google', 191)->nullable();
$table->string('copyright_text', 191)->nullable();
$table->string('footer_text', 191)->nullable();
$table->text('terms', 65535)->nullable();
$table->text('disclaimer', 65535)->nullable();
$table->text('google_analytics', 65535)->nullable();
$table->string('home_video1', 191)->nullable();
$table->string('home_video2', 191)->nullable();
$table->string('home_video3', 191)->nullable();
$table->string('home_video4', 191)->nullable();
$table->string('explanation1', 191)->nullable();
$table->string('explanation2', 191)->nullable();
$table->string('explanation3', 191)->nullable();
$table->string('explanation4', 191)->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('settings');
}
class CreateSettingsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('settings', function (Blueprint $table) {
$table->increments('id');
$table->string('logo', 191)->nullable();
$table->string('favicon', 191)->nullable();
$table->string('seo_title', 191)->nullable();
$table->text('seo_keyword', 65535)->nullable();
$table->text('seo_description', 65535)->nullable();
$table->string('company_contact', 191)->nullable();
$table->text('company_address', 65535)->nullable();
$table->string('from_name', 191)->nullable();
$table->string('from_email', 191)->nullable();
$table->string('facebook', 191)->nullable();
$table->string('linkedin', 191)->nullable();
$table->string('twitter', 191)->nullable();
$table->string('google', 191)->nullable();
$table->string('copyright_text', 191)->nullable();
$table->string('footer_text', 191)->nullable();
$table->text('terms', 65535)->nullable();
$table->text('disclaimer', 65535)->nullable();
$table->text('google_analytics', 65535)->nullable();
$table->string('home_video1', 191)->nullable();
$table->string('home_video2', 191)->nullable();
$table->string('home_video3', 191)->nullable();
$table->string('home_video4', 191)->nullable();
$table->string('explanation1', 191)->nullable();
$table->string('explanation2', 191)->nullable();
$table->string('explanation3', 191)->nullable();
$table->string('explanation4', 191)->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('settings');
}
}
......@@ -3,36 +3,33 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSocialLoginsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('social_logins', function(Blueprint $table)
{
$table->increments('id');
$table->integer('user_id')->unsigned()->index('social_logins_user_id_foreign');
$table->string('provider', 32);
$table->string('provider_id', 191);
$table->string('token', 191)->nullable();
$table->string('avatar', 191)->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('social_logins');
}
class CreateSocialLoginsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('social_logins', function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id')->unsigned()->index('social_logins_user_id_foreign');
$table->string('provider', 32);
$table->string('provider_id', 191);
$table->string('token', 191)->nullable();
$table->string('avatar', 191)->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('social_logins');
}
}
......@@ -3,34 +3,31 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateStatesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('states', function(Blueprint $table)
{
$table->increments('id');
$table->integer('country_id')->unsigned()->index();
$table->string('state', 191);
$table->string('state_code', 191);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('states');
}
class CreateStatesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('states', function (Blueprint $table) {
$table->increments('id');
$table->integer('country_id')->unsigned()->index();
$table->string('state', 191);
$table->string('state_code', 191);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('states');
}
}
......@@ -3,49 +3,46 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateUsersTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function(Blueprint $table)
{
$table->increments('id');
$table->string('first_name', 191);
$table->string('last_name', 191);
$table->string('email', 191)->unique();
$table->string('password', 191)->nullable();
$table->text('address', 65535)->nullable();
$table->integer('country_id')->unsigned()->index();
$table->integer('state_id')->unsigned()->index();
$table->integer('city_id')->unsigned()->index();
$table->string('zip_code', 191);
$table->string('ssn', 191);
$table->boolean('status')->default(1);
$table->string('confirmation_code', 191)->nullable();
$table->boolean('confirmed')->default(0);
$table->boolean('is_term_accept')->default(0)->comment(' 0 = not accepted,1 = accepted');
$table->string('remember_token', 100)->nullable();
$table->integer('created_by')->unsigned();
$table->integer('updated_by')->unsigned()->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
}
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('first_name', 191);
$table->string('last_name', 191);
$table->string('email', 191)->unique();
$table->string('password', 191)->nullable();
$table->text('address', 65535)->nullable();
$table->integer('country_id')->unsigned()->index();
$table->integer('state_id')->unsigned()->index();
$table->integer('city_id')->unsigned()->index();
$table->string('zip_code', 191);
$table->string('ssn', 191);
$table->boolean('status')->default(1);
$table->string('confirmation_code', 191)->nullable();
$table->boolean('confirmed')->default(0);
$table->boolean('is_term_accept')->default(0)->comment(' 0 = not accepted,1 = accepted');
$table->string('remember_token', 100)->nullable();
$table->integer('created_by')->unsigned();
$table->integer('updated_by')->unsigned()->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
}
}
......@@ -3,35 +3,31 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToHistoryTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('history', function(Blueprint $table)
{
$table->foreign('type_id')->references('id')->on('history_types')->onUpdate('RESTRICT')->onDelete('CASCADE');
$table->foreign('user_id')->references('id')->on('users')->onUpdate('RESTRICT')->onDelete('CASCADE');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('history', function(Blueprint $table)
{
$table->dropForeign('history_type_id_foreign');
$table->dropForeign('history_user_id_foreign');
});
}
class AddForeignKeysToHistoryTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('history', function (Blueprint $table) {
$table->foreign('type_id')->references('id')->on('history_types')->onUpdate('RESTRICT')->onDelete('CASCADE');
$table->foreign('user_id')->references('id')->on('users')->onUpdate('RESTRICT')->onDelete('CASCADE');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('history', function (Blueprint $table) {
$table->dropForeign('history_type_id_foreign');
$table->dropForeign('history_user_id_foreign');
});
}
}
......@@ -3,33 +3,29 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToNotificationsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('notifications', function(Blueprint $table)
{
$table->foreign('user_id')->references('id')->on('users')->onUpdate('RESTRICT')->onDelete('CASCADE');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('notifications', function(Blueprint $table)
{
$table->dropForeign('notifications_user_id_foreign');
});
}
class AddForeignKeysToNotificationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('notifications', function (Blueprint $table) {
$table->foreign('user_id')->references('id')->on('users')->onUpdate('RESTRICT')->onDelete('CASCADE');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('notifications', function (Blueprint $table) {
$table->dropForeign('notifications_user_id_foreign');
});
}
}
......@@ -3,35 +3,31 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToPermissionRoleTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('permission_role', function(Blueprint $table)
{
$table->foreign('permission_id')->references('id')->on('permissions')->onUpdate('RESTRICT')->onDelete('CASCADE');
$table->foreign('role_id')->references('id')->on('roles')->onUpdate('RESTRICT')->onDelete('CASCADE');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('permission_role', function(Blueprint $table)
{
$table->dropForeign('permission_role_permission_id_foreign');
$table->dropForeign('permission_role_role_id_foreign');
});
}
class AddForeignKeysToPermissionRoleTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('permission_role', function (Blueprint $table) {
$table->foreign('permission_id')->references('id')->on('permissions')->onUpdate('RESTRICT')->onDelete('CASCADE');
$table->foreign('role_id')->references('id')->on('roles')->onUpdate('RESTRICT')->onDelete('CASCADE');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('permission_role', function (Blueprint $table) {
$table->dropForeign('permission_role_permission_id_foreign');
$table->dropForeign('permission_role_role_id_foreign');
});
}
}
......@@ -3,35 +3,31 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToPermissionUserTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('permission_user', function(Blueprint $table)
{
$table->foreign('permission_id')->references('id')->on('permissions')->onUpdate('RESTRICT')->onDelete('CASCADE');
$table->foreign('user_id')->references('id')->on('users')->onUpdate('RESTRICT')->onDelete('CASCADE');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('permission_user', function(Blueprint $table)
{
$table->dropForeign('permission_user_permission_id_foreign');
$table->dropForeign('permission_user_user_id_foreign');
});
}
class AddForeignKeysToPermissionUserTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('permission_user', function (Blueprint $table) {
$table->foreign('permission_id')->references('id')->on('permissions')->onUpdate('RESTRICT')->onDelete('CASCADE');
$table->foreign('user_id')->references('id')->on('users')->onUpdate('RESTRICT')->onDelete('CASCADE');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('permission_user', function (Blueprint $table) {
$table->dropForeign('permission_user_permission_id_foreign');
$table->dropForeign('permission_user_user_id_foreign');
});
}
}
......@@ -3,35 +3,31 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToRoleUserTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('role_user', function(Blueprint $table)
{
$table->foreign('role_id')->references('id')->on('roles')->onUpdate('RESTRICT')->onDelete('CASCADE');
$table->foreign('user_id')->references('id')->on('users')->onUpdate('RESTRICT')->onDelete('CASCADE');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('role_user', function(Blueprint $table)
{
$table->dropForeign('role_user_role_id_foreign');
$table->dropForeign('role_user_user_id_foreign');
});
}
class AddForeignKeysToRoleUserTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('role_user', function (Blueprint $table) {
$table->foreign('role_id')->references('id')->on('roles')->onUpdate('RESTRICT')->onDelete('CASCADE');
$table->foreign('user_id')->references('id')->on('users')->onUpdate('RESTRICT')->onDelete('CASCADE');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('role_user', function (Blueprint $table) {
$table->dropForeign('role_user_role_id_foreign');
$table->dropForeign('role_user_user_id_foreign');
});
}
}
......@@ -3,33 +3,29 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToSocialLoginsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('social_logins', function(Blueprint $table)
{
$table->foreign('user_id')->references('id')->on('users')->onUpdate('RESTRICT')->onDelete('CASCADE');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('social_logins', function(Blueprint $table)
{
$table->dropForeign('social_logins_user_id_foreign');
});
}
class AddForeignKeysToSocialLoginsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('social_logins', function (Blueprint $table) {
$table->foreign('user_id')->references('id')->on('users')->onUpdate('RESTRICT')->onDelete('CASCADE');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('social_logins', function (Blueprint $table) {
$table->dropForeign('social_logins_user_id_foreign');
});
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment