first commit
This commit is contained in:
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateBranchesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('branches', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('slug');
|
||||
$table->string('email')->nullable();
|
||||
$table->string('telephone')->nullable();
|
||||
$table->string('phone1')->nullable();
|
||||
$table->string('phone2')->nullable();
|
||||
$table->string('address')->nullable();
|
||||
$table->string('company_reg')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
$table->string('keywords')->nullable();
|
||||
$table->enum('status',['active','in_active'])->nullable()->default('in_active');
|
||||
$table->enum('is_main',['yes','no'])->nullable()->default('no');
|
||||
$table->enum('visibility',['visible','invisible'])->nullable()->default('invisible');
|
||||
$table->enum('availability',['available','not_available'])->nullable()->default('not_available');
|
||||
$table->enum('is_deleted',['yes','no'])->nullable()->default('no');
|
||||
$table->timestamp('deleted_at')->nullable();
|
||||
$table->bigInteger('created_by')->unsigned()->index()->nullable();
|
||||
$table->bigInteger('last_updated_by')->unsigned()->index()->nullable();
|
||||
$table->bigInteger('last_deleted_by')->unsigned()->index()->nullable();
|
||||
// $table->foreign('created_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
// $table->foreign('last_updated_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
// $table->foreign('last_deleted_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('branches');
|
||||
}
|
||||
}
|
41
database/migrations/2014_10_12_000000_create_users_table.php
Normal file
41
database/migrations/2014_10_12_000000_create_users_table.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUsersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->enum('status',['active','in_active'])->nullable();
|
||||
$table->enum('is_deleted',['yes','no'])->nullable()->default('no');
|
||||
$table->timestamp('deleted_at')->nullable();
|
||||
$table->bigInteger('last_updated_by')->nullable();
|
||||
$table->bigInteger('last_deleted_by')->nullable();
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePasswordResetsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('password_resets', function (Blueprint $table) {
|
||||
$table->string('email')->index();
|
||||
$table->string('token');
|
||||
$table->timestamp('created_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('password_resets');
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateFailedJobsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('failed_jobs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('uuid')->unique();
|
||||
$table->text('connection');
|
||||
$table->text('queue');
|
||||
$table->longText('payload');
|
||||
$table->longText('exception');
|
||||
$table->timestamp('failed_at')->useCurrent();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('failed_jobs');
|
||||
}
|
||||
}
|
@ -0,0 +1,113 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreatePermissionTables extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$tableNames = config('permission.table_names');
|
||||
$columnNames = config('permission.column_names');
|
||||
|
||||
if (empty($tableNames)) {
|
||||
throw new \Exception('Error: config/permission.php not loaded. Run [php artisan config:clear] and try again.');
|
||||
}
|
||||
|
||||
Schema::create($tableNames['permissions'], function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name',125); // For MySQL 8.0 use string('name', 125);
|
||||
$table->string('guard_name',125); // For MySQL 8.0 use string('guard_name', 125);
|
||||
$table->timestamps();
|
||||
$table->unique(['name', 'guard_name']);
|
||||
});
|
||||
|
||||
Schema::create($tableNames['roles'], function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name',125); // For MySQL 8.0 use string('name', 125);
|
||||
$table->string('guard_name',125); // For MySQL 8.0 use string('guard_name', 125);
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(['name', 'guard_name']);
|
||||
});
|
||||
|
||||
Schema::create($tableNames['model_has_permissions'], function (Blueprint $table) use ($tableNames, $columnNames) {
|
||||
$table->unsignedBigInteger('permission_id');
|
||||
|
||||
$table->string('model_type');
|
||||
$table->unsignedBigInteger($columnNames['model_morph_key']);
|
||||
$table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_permissions_model_id_model_type_index');
|
||||
|
||||
$table->foreign('permission_id')
|
||||
->references('id')
|
||||
->on($tableNames['permissions'])
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->primary(['permission_id', $columnNames['model_morph_key'], 'model_type'],
|
||||
'model_has_permissions_permission_model_type_primary');
|
||||
});
|
||||
|
||||
Schema::create($tableNames['model_has_roles'], function (Blueprint $table) use ($tableNames, $columnNames) {
|
||||
$table->unsignedBigInteger('role_id');
|
||||
|
||||
$table->string('model_type');
|
||||
$table->unsignedBigInteger($columnNames['model_morph_key']);
|
||||
$table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_roles_model_id_model_type_index');
|
||||
|
||||
$table->foreign('role_id')
|
||||
->references('id')
|
||||
->on($tableNames['roles'])
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->primary(['role_id', $columnNames['model_morph_key'], 'model_type'],
|
||||
'model_has_roles_role_model_type_primary');
|
||||
});
|
||||
|
||||
Schema::create($tableNames['role_has_permissions'], function (Blueprint $table) use ($tableNames) {
|
||||
$table->unsignedBigInteger('permission_id');
|
||||
$table->unsignedBigInteger('role_id');
|
||||
|
||||
$table->foreign('permission_id')
|
||||
->references('id')
|
||||
->on($tableNames['permissions'])
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreign('role_id')
|
||||
->references('id')
|
||||
->on($tableNames['roles'])
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->primary(['permission_id', 'role_id'], 'role_has_permissions_permission_id_role_id_primary');
|
||||
});
|
||||
|
||||
app('cache')
|
||||
->store(config('permission.cache.store') != 'default' ? config('permission.cache.store') : null)
|
||||
->forget(config('permission.cache.key'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
$tableNames = config('permission.table_names');
|
||||
|
||||
if (empty($tableNames)) {
|
||||
throw new \Exception('Error: config/permission.php not found and defaults could not be merged. Please publish the package configuration before proceeding, or drop the tables manually.');
|
||||
}
|
||||
|
||||
Schema::drop($tableNames['role_has_permissions']);
|
||||
Schema::drop($tableNames['model_has_roles']);
|
||||
Schema::drop($tableNames['model_has_permissions']);
|
||||
Schema::drop($tableNames['roles']);
|
||||
Schema::drop($tableNames['permissions']);
|
||||
}
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddFieldRolesPermission extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
Schema::table('roles', function (Blueprint $table) {
|
||||
$table->enum('is_deleted',['yes','no'])->nullable()->default('no');
|
||||
$table->timestamp('deleted_at')->nullable();
|
||||
$table->bigInteger('created_by')->unsigned()->index()->nullable();
|
||||
$table->bigInteger('last_updated_by')->unsigned()->index()->nullable();
|
||||
$table->bigInteger('last_deleted_by')->unsigned()->index()->nullable();
|
||||
$table->foreign('created_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->foreign('last_updated_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->foreign('last_deleted_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
});
|
||||
|
||||
Schema::table('permissions', function (Blueprint $table) {
|
||||
$table->string('group_name')->nullable();
|
||||
$table->enum('is_deleted',['yes','no'])->nullable()->default('no');
|
||||
$table->timestamp('deleted_at')->nullable();
|
||||
$table->bigInteger('created_by')->unsigned()->index()->nullable();
|
||||
$table->bigInteger('last_updated_by')->unsigned()->index()->nullable();
|
||||
$table->bigInteger('last_deleted_by')->unsigned()->index()->nullable();
|
||||
$table->foreign('created_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->foreign('last_updated_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->foreign('last_deleted_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
});
|
||||
|
||||
Schema::create('role_user', function (Blueprint $table) {
|
||||
$table->increments('id')->unsigned();
|
||||
$table->bigInteger('role_id')->unsigned()->index();
|
||||
$table->foreign('role_id')->references('id')->on('roles')->onDelete('cascade');
|
||||
$table->bigInteger('user_id')->unsigned()->index();
|
||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
Schema::table('roles', function (Blueprint $table) {
|
||||
$table->dropColumn('is_deleted');
|
||||
$table->dropColumn('deleted_at');
|
||||
$table->dropColumn('created_by');
|
||||
$table->dropColumn('last_updated_by');
|
||||
$table->dropColumn('last_deleted_by');
|
||||
});
|
||||
|
||||
Schema::table('permissions', function (Blueprint $table) {
|
||||
$table->dropColumn('is_deleted');
|
||||
$table->dropColumn('deleted_at');
|
||||
$table->dropColumn('created_by');
|
||||
$table->dropColumn('last_updated_by');
|
||||
$table->dropColumn('last_deleted_by');
|
||||
});
|
||||
|
||||
Schema::dropIfExists('role_user');
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCountriesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('countries', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedInteger('phone_code')->nullable();
|
||||
$table->string('country_code',255)->nullable();
|
||||
$table->string('country_name',255)->nullable();
|
||||
$table->enum('status',['Active','Inactive'])->default('Active');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('countries');
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateStatesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('states', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('state_name')->nullable();
|
||||
$table->bigInteger('country_id')->unsigned()->index()->nullable();
|
||||
$table->foreign('country_id')->references('id')->on('countries')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->enum('status',['Active','Inactive'])->default('Active');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('states');
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateDistrictsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('districts', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('district_name')->nullable();
|
||||
$table->bigInteger('country_id')->unsigned()->index()->nullable();
|
||||
$table->foreign('country_id')->references('id')->on('countries')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->bigInteger('state_id')->unsigned()->index()->nullable();
|
||||
$table->foreign('state_id')->references('id')->on('states')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->enum('status',['Active','Inactive'])->default('Active');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('districts');
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCollegesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('colleges', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name')->nullable();
|
||||
$table->bigInteger('country_id')->unsigned()->index()->nullable();
|
||||
$table->foreign('country_id')->references('id')->on('countries')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->bigInteger('state_id')->unsigned()->index()->nullable();
|
||||
$table->foreign('state_id')->references('id')->on('states')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->enum('status',['Active','Inactive'])->default('Active');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('colleges');
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateAgentsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('tbl_agents', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->string('phone');
|
||||
$table->string('display_order')->nullable();
|
||||
$table->string('remarks')->nullable();
|
||||
$table->enum('status',['active','in_active'])->nullable();
|
||||
$table->bigInteger('created_by')->unsigned()->index()->nullable();
|
||||
$table->bigInteger('last_updated_by')->unsigned()->index()->nullable();
|
||||
$table->foreign('created_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->foreign('last_updated_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('agents');
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateLeadCategoriesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('tbl_leadcategories', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('alias')->nullable();
|
||||
$table->string('color_code');
|
||||
$table->string('display_order')->nullable();
|
||||
$table->text('remarks')->nullable();
|
||||
$table->enum('status',['active','in_active'])->nullable();
|
||||
$table->bigInteger('created_by')->unsigned()->index()->nullable();
|
||||
$table->foreign('created_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->date('created_on')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('tbl_leadcategories');
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCampaignsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('tbl_campaigns', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('alias')->nullable();
|
||||
$table->string('details')->nullable();
|
||||
$table->string('banner')->nullable();
|
||||
$table->string('ogImage')->nullable();
|
||||
$table->date('starts')->nullable();
|
||||
$table->date('ends')->nullable();
|
||||
$table->text('ogtags')->nullable();
|
||||
$table->text('success_message')->nullable();
|
||||
$table->text('sms_message')->nullable();
|
||||
$table->text('coupon_codes')->nullable();
|
||||
$table->string('url')->nullable();
|
||||
$table->string('keywords')->nullable();
|
||||
$table->text('headers')->nullable();
|
||||
$table->string('description')->nullable();
|
||||
$table->string('display_order')->nullable();
|
||||
$table->text('remarks')->nullable();
|
||||
$table->enum('status',['active','in_active'])->nullable();
|
||||
$table->bigInteger('created_by')->unsigned()->index()->nullable();
|
||||
$table->foreign('created_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->date('created_on')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('tbl_campaigns');
|
||||
}
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateRegistrationsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('tbl_registrations', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigInteger('campaign_id')->unsigned()->index()->nullable();
|
||||
$table->foreign('campaign_id')->references('id')->on('tbl_campaigns')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->string('name');
|
||||
$table->string('email')->nullable();
|
||||
$table->string('phone')->nullable();
|
||||
$table->bigInteger('leadcategory_id')->unsigned()->index()->nullable()->default(1);
|
||||
$table->bigInteger('country_id')->unsigned()->index()->nullable();
|
||||
$table->bigInteger('state_id')->unsigned()->index()->nullable();
|
||||
$table->bigInteger('district_id')->unsigned()->index()->nullable();
|
||||
$table->string('municipality_name', 255)->nullable();
|
||||
$table->unsignedInteger('ward_no')->nullable();
|
||||
$table->string('village_name', 255)->nullable();
|
||||
$table->string('full_address', 255)->nullable();
|
||||
$table->foreign('country_id')->references('id')->on('countries')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->foreign('state_id')->references('id')->on('states')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->foreign('district_id')->references('id')->on('districts')->onUpdate('cascade')->onDelete('cascade');
|
||||
|
||||
$table->string('see_year')->nullable();
|
||||
$table->string('see_grade')->nullable();
|
||||
$table->string('see_stream')->nullable();
|
||||
$table->string('see_school')->nullable();
|
||||
$table->string('plus2_year')->nullable();
|
||||
$table->string('plus2_grade')->nullable();
|
||||
$table->string('plus2_stream')->nullable();
|
||||
$table->string('plus2_college')->nullable();
|
||||
$table->string('bachelors_year')->nullable();
|
||||
$table->string('bachelors_grade')->nullable();
|
||||
$table->string('bachelors_stream')->nullable();
|
||||
$table->string('bachelors_college')->nullable();
|
||||
$table->string('highest_qualification')->nullable();
|
||||
$table->string('highest_grade')->nullable();
|
||||
$table->string('highest_stream')->nullable();
|
||||
$table->string('highest_college')->nullable();
|
||||
$table->string('preparation_class')->nullable();
|
||||
$table->string('preparation_score')->nullable();
|
||||
$table->string('preparation_bandscore')->nullable();
|
||||
$table->string('preparation_date')->nullable();
|
||||
$table->text('test_name')->nullable();
|
||||
$table->string('test_score')->nullable();
|
||||
$table->string('preffered_location')->nullable();
|
||||
$table->string('intrested_for_country')->nullable();
|
||||
$table->string('intrested_course')->nullable();
|
||||
$table->string('display_order')->nullable();
|
||||
$table->text('remarks')->nullable();
|
||||
$table->enum('status', ['active', 'in_active'])->nullable();
|
||||
$table->string('user_agent')->nullable();
|
||||
$table->string('source')->nullable();
|
||||
$table->string('tracking_code')->nullable();
|
||||
$table->string('headers')->nullable();
|
||||
$table->string('coupen_code')->nullable();
|
||||
$table->bigInteger('created_by')->unsigned()->index()->nullable();
|
||||
$table->foreign('created_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->date('created_on')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('tbl_registrations');
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class ChangesFieldTypeOfTblCampaigns extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
Schema::table('tbl_campaigns', function (Blueprint $table) {
|
||||
$table->text('ogtags')->change();
|
||||
$table->text('details')->change();
|
||||
$table->string('email_success')->nullable();
|
||||
$table->string('offered_course')->nullable();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
Schema::table('tbl_campaigns', function (Blueprint $table) {
|
||||
$table->dropColumn(['email_success','offered_course']);
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateFollowUpsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('tbl_follow_ups', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('follow_up_type');
|
||||
$table->bigInteger('refrence_id')->unsigned()->index()->nullable();
|
||||
$table->date('next_schedule')->nullable();
|
||||
$table->string('follow_up_name')->nullable();
|
||||
$table->string('follow_up_by')->nullable();
|
||||
$table->text('remarks')->nullable();
|
||||
$table->string('display_order')->nullable();
|
||||
$table->enum('status',['active','in_active'])->nullable();
|
||||
$table->bigInteger('created_by')->unsigned()->index()->nullable();
|
||||
$table->bigInteger('last_updated_by')->unsigned()->index()->nullable();
|
||||
$table->foreign('created_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->foreign('last_updated_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('tbl_follow_ups');
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateQualificationsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('tbl_qualifications', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('description',1024)->nullable();
|
||||
$table->enum('status',['Active','Inactive'])->default('Active');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('tbl_qualifications');
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTestPreparationsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('tbl_testpreparations', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('description',1024)->nullable();
|
||||
$table->enum('status',['Active','Inactive'])->default('Active');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('tbl_testpreparations');
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateLocationsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('tbl_locations', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('slug')->nullable();
|
||||
$table->string('email')->unique();
|
||||
$table->text('description')->nullable();
|
||||
$table->bigInteger('user_id')->unsigned()->index()->nullable();
|
||||
$table->string('display_order')->nullable();
|
||||
$table->text('remarks')->nullable();
|
||||
$table->enum('status',['active','in_active'])->nullable();
|
||||
$table->bigInteger('created_by')->unsigned()->index()->nullable();
|
||||
$table->foreign('created_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->foreign('user_id')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->date('created_on')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('tbl_locations');
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSettingsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('tbl_settings', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->string('slug');
|
||||
$table->longtext('value')->nullable();
|
||||
$table->boolean('is_active')->default(true);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('tbl_settings');
|
||||
}
|
||||
}
|
36
database/migrations/2022_08_18_063916_create_jobs_table.php
Normal file
36
database/migrations/2022_08_18_063916_create_jobs_table.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateJobsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('jobs', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('queue')->index();
|
||||
$table->longText('payload');
|
||||
$table->unsignedTinyInteger('attempts');
|
||||
$table->unsignedInteger('reserved_at')->nullable();
|
||||
$table->unsignedInteger('available_at');
|
||||
$table->unsignedInteger('created_at');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('jobs');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user