first commit
This commit is contained in:
Vendored
BIN
Binary file not shown.
Executable
+1
@@ -0,0 +1 @@
|
||||
Access Denied
|
||||
Executable
+55
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* spreadsheet Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class spreadsheet extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('spreadsheet');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('spreadsheet');
|
||||
$table->addColumn('name','string',["limit" => 255])
|
||||
->addColumn('value','text')
|
||||
->addColumn('user_id','integer')
|
||||
->addColumn('status','integer')
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('spreadsheet')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+64
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* marketing Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class marketing extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('marketing');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('marketing');
|
||||
$table->addColumn('user_id','integer')
|
||||
->addColumn('password_protect','string',["limit" => 255])
|
||||
->addColumn('content_template_path','text')
|
||||
->addColumn('header_template_path','text')
|
||||
->addColumn('footer_template_path','text')
|
||||
->addColumn('title','text')
|
||||
->addColumn('seo_title','text')
|
||||
->addColumn('seo_description','text')
|
||||
->addColumn('content','text')
|
||||
->addColumn('status','integer')
|
||||
->addColumn('publish_date','date', ['null' => true])
|
||||
->addColumn('slug','text')
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->addIndex(["slug"], ['unique' => true])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('marketing')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+55
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* setting Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class setting extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('setting');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('setting');
|
||||
$table->addColumn('key','string',["limit" => 50])
|
||||
->addColumn('type','integer')
|
||||
->addColumn('value','text')
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->addIndex(["key"], ['unique' => true])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('setting')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* role Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class role extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('role');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('role');
|
||||
$table->addColumn('name','string',["limit" => 16])
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->addIndex(["name"], ['unique' => true])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('role')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+55
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* referLog Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class referLog extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('refer_log');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('refer_log');
|
||||
$table->addColumn('user_id','integer')
|
||||
->addColumn('referrer_user_id','integer')
|
||||
->addColumn('type','integer')
|
||||
->addColumn('status','integer')
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('refer_log')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+58
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* credential Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class credential extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('credential');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('credential');
|
||||
$table->addColumn('email','string',["limit" => 255])
|
||||
->addColumn('password','string',["limit" => 255])
|
||||
->addColumn('type','string',["limit" => 2])
|
||||
->addColumn('verify','integer')
|
||||
->addColumn('role_id','integer')
|
||||
->addColumn('user_id','integer')
|
||||
->addColumn('status','integer')
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('credential')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+60
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* user Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class user extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('user');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('user');
|
||||
$table->addColumn('first_name','string',["limit" => 255])
|
||||
->addColumn('last_name','string',["limit" => 255])
|
||||
->addColumn('paypal_email','string',["limit" => 500])
|
||||
->addColumn('phone','string',["limit" => 50])
|
||||
->addColumn('image','text')
|
||||
->addColumn('image_id','integer')
|
||||
->addColumn('refer','string',["limit" => 50])
|
||||
->addColumn('profile_id','integer')
|
||||
->addColumn('stripe_id','string',["limit" => 255])
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('user')->drop()->save();
|
||||
}
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* memberProfile Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class memberProfile extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('member_profile');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('member_profile');
|
||||
$table->addColumn('user_id','integer')
|
||||
->addColumn('username','string',["limit" => 50])
|
||||
->addColumn('school_id','integer')
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('member_profile')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+57
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* token Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class token extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('token');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('token');
|
||||
$table->addColumn('token','text')
|
||||
->addColumn('data','text')
|
||||
->addColumn('type','integer')
|
||||
->addColumn('user_id','integer')
|
||||
->addColumn('ttl','integer')
|
||||
->addColumn('issue_at','datetime', ['null' => true])
|
||||
->addColumn('expire_at','datetime', ['null' => true])
|
||||
->addColumn('status','integer')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('token')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+56
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* cookies Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class cookies extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('cookies');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('cookies');
|
||||
$table->addColumn('user_id','integer')
|
||||
->addColumn('name','string',["limit" => 255])
|
||||
->addColumn('value','string',["limit" => 255])
|
||||
->addColumn('expire','string',["limit" => 255])
|
||||
->addColumn('domain','string',["limit" => 255])
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('cookies')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+58
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* email Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class email extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('email');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('email');
|
||||
$table->addColumn('slug','string',["limit" => 50])
|
||||
->addColumn('email_header','text')
|
||||
->addColumn('email_footer','text')
|
||||
->addColumn('subject','text')
|
||||
->addColumn('tag','text')
|
||||
->addColumn('html','text')
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->addIndex(["slug"], ['unique' => true])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('email')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+55
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* sms Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class sms extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('sms');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('sms');
|
||||
$table->addColumn('slug','string',["limit" => 50])
|
||||
->addColumn('tag','text')
|
||||
->addColumn('content','text')
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->addIndex(["slug"], ['unique' => true])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('sms')->drop()->save();
|
||||
}
|
||||
}
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* adminOperation Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class adminOperation extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('admin_operation');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('admin_operation');
|
||||
$table->addColumn('user_id','integer')
|
||||
->addColumn('action','string',["limit" => 50])
|
||||
->addColumn('detail','text')
|
||||
->addColumn('last_ip','string',["limit" => 25])
|
||||
->addColumn('user_agent','string',["limit" => 100])
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('admin_operation')->drop()->save();
|
||||
}
|
||||
}
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* memberOperation Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class memberOperation extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('member_operation');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('member_operation');
|
||||
$table->addColumn('user_id','integer')
|
||||
->addColumn('action','string',["limit" => 50])
|
||||
->addColumn('detail','text')
|
||||
->addColumn('last_ip','string',["limit" => 25])
|
||||
->addColumn('user_agent','string',["limit" => 100])
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('member_operation')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+57
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* image Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class image extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('image');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('image');
|
||||
$table->addColumn('url','text')
|
||||
->addColumn('caption','text')
|
||||
->addColumn('user_id','integer')
|
||||
->addColumn('width','integer')
|
||||
->addColumn('height','integer')
|
||||
->addColumn('type','integer')
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('image')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+73
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* inventory Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class inventory extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('inventory');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('inventory');
|
||||
$table->addColumn('user_id','integer')
|
||||
->addColumn('title','string',["limit" => 255])
|
||||
->addColumn('school_id','integer')
|
||||
->addColumn('professor_id','integer')
|
||||
->addColumn('class_id','integer')
|
||||
->addColumn('textbook_id','integer')
|
||||
->addColumn('word_count','integer')
|
||||
->addColumn('year','integer')
|
||||
->addColumn('isbn','string',["limit" => 255])
|
||||
->addColumn('paypal_email','string',["limit" => 255])
|
||||
->addColumn('file','text')
|
||||
->addColumn('file_id','integer')
|
||||
->addColumn('feature_image','text')
|
||||
->addColumn('feature_image2','text')
|
||||
->addColumn('feature_image3','text')
|
||||
->addColumn('feature_image_id','integer')
|
||||
->addColumn('note_type','integer')
|
||||
->addColumn('description','text')
|
||||
->addColumn('inventory_note','text')
|
||||
->addColumn('pin_to_top','integer')
|
||||
->addColumn('approve','integer')
|
||||
->addColumn('status','integer')
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('inventory')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+55
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* notification Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class notification extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('notification');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('notification');
|
||||
$table->addColumn('user_id','integer')
|
||||
->addColumn('message','text')
|
||||
->addColumn('url','text')
|
||||
->addColumn('read_status','integer')
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('notification')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+57
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* review Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class review extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('review');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('review');
|
||||
$table->addColumn('user_id','integer')
|
||||
->addColumn('inventory_id','integer')
|
||||
->addColumn('order_id','integer')
|
||||
->addColumn('status','integer')
|
||||
->addColumn('comment','text')
|
||||
->addColumn('rating','integer')
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('review')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+56
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* ticket Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class ticket extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('ticket');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('ticket');
|
||||
$table->addColumn('user_id','integer')
|
||||
->addColumn('order_id','integer')
|
||||
->addColumn('message','text')
|
||||
->addColumn('receive_status','integer')
|
||||
->addColumn('status','integer')
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('ticket')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+57
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* suggestion Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class suggestion extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('suggestion');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('suggestion');
|
||||
$table->addColumn('seller_id','integer')
|
||||
->addColumn('name','string',["limit" => 255])
|
||||
->addColumn('email','string',["limit" => 255])
|
||||
->addColumn('suggestion_type','integer')
|
||||
->addColumn('additional_notes','text')
|
||||
->addColumn('status','integer')
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('suggestion')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+54
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* contactUs Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class contactUs extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('contact_us');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('contact_us');
|
||||
$table->addColumn('name','string',["limit" => 255])
|
||||
->addColumn('email','string',["limit" => 255])
|
||||
->addColumn('message','string',["limit" => 255])
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('contact_us')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+59
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* payout Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class payout extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('payout');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('payout');
|
||||
$table->addColumn('user_id','integer')
|
||||
->addColumn('order_id','integer')
|
||||
->addColumn('inventory_id','integer')
|
||||
->addColumn('name','string',["limit" => 255])
|
||||
->addColumn('email','string',["limit" => 255])
|
||||
->addColumn('amount','string',["limit" => 255])
|
||||
->addColumn('payout_date','date', ['null' => true])
|
||||
->addColumn('status','integer')
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('payout')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+55
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* content Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class content extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('content');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('content');
|
||||
$table->addColumn('content_name','string',["limit" => 255])
|
||||
->addColumn('content_type','integer')
|
||||
->addColumn('content','text')
|
||||
->addColumn('status','integer')
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('content')->drop()->save();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* inventoryGalleryImageList Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class inventoryGalleryImageList extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('inventory_gallery_image_list');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('inventory_gallery_image_list');
|
||||
$table->addColumn('inventory_id','integer')
|
||||
->addColumn('gallery_image','text')
|
||||
->addColumn('gallery_image_id','integer')
|
||||
->addColumn('status','integer')
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('inventory_gallery_image_list')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* category Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class category extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('category');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('category');
|
||||
$table->addColumn('name','string',["limit" => 255])
|
||||
->addColumn('status','integer')
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('category')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* school Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class school extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('school');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('school');
|
||||
$table->addColumn('name','string',["limit" => 255])
|
||||
->addColumn('status','integer')
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('school')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* professor Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class professor extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('professor');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('professor');
|
||||
$table->addColumn('name','string',["limit" => 255])
|
||||
->addColumn('status','integer')
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('professor')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* classes Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class classes extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('classes');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('classes');
|
||||
$table->addColumn('name','string',["limit" => 255])
|
||||
->addColumn('status','integer')
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('classes')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+54
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* textbook Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class textbook extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('textbook');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('textbook');
|
||||
$table->addColumn('name','string',["limit" => 255])
|
||||
->addColumn('isbn','string',["limit" => 255])
|
||||
->addColumn('status','integer')
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('textbook')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+56
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* cart Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class cart extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('cart');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('cart');
|
||||
$table->addColumn('inventory_id','integer')
|
||||
->addColumn('user_id','integer')
|
||||
->addColumn('session_id','integer')
|
||||
->addColumn('subtotal','string',["limit" => 255])
|
||||
->addColumn('total','string',["limit" => 255])
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('cart')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+63
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* order Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class order extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('order');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('order');
|
||||
$table->addColumn('purchase_user_id','integer')
|
||||
->addColumn('sale_user_id','integer')
|
||||
->addColumn('inventory_id','integer')
|
||||
->addColumn('order_date','date', ['null' => true])
|
||||
->addColumn('order_time','string',["limit" => 255])
|
||||
->addColumn('subtotal','string',["limit" => 255])
|
||||
->addColumn('tax','string',["limit" => 255])
|
||||
->addColumn('discount','string',["limit" => 255])
|
||||
->addColumn('total','string',["limit" => 255])
|
||||
->addColumn('stripe_charge_id','string',["limit" => 255])
|
||||
->addColumn('stripe_intent','text')
|
||||
->addColumn('status','integer')
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('order')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+52
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* tax Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class tax extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('tax');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('tax');
|
||||
$table->addColumn('tax_rate','string',["limit" => 255])
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('tax')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+62
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* transaction Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class transaction extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('transaction');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('transaction');
|
||||
$table->addColumn('order_id','integer')
|
||||
->addColumn('user_id','integer')
|
||||
->addColumn('transaction_date','date', ['null' => true])
|
||||
->addColumn('transaction_time','string',["limit" => 255])
|
||||
->addColumn('subtotal','string',["limit" => 255])
|
||||
->addColumn('tax','string',["limit" => 255])
|
||||
->addColumn('discount','string',["limit" => 255])
|
||||
->addColumn('total','string',["limit" => 255])
|
||||
->addColumn('stripe_charge_id','string',["limit" => 255])
|
||||
->addColumn('payment_method','integer')
|
||||
->addColumn('status','integer')
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('transaction')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* orderNotes Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class orderNotes extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('order_notes');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('order_notes');
|
||||
$table->addColumn('order_id','integer')
|
||||
->addColumn('description','text')
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('order_notes')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+59
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* dispute Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class dispute extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('dispute');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('dispute');
|
||||
$table->addColumn('order_id','integer')
|
||||
->addColumn('user_id','integer')
|
||||
->addColumn('amount','string',["limit" => 255])
|
||||
->addColumn('reason','string',["limit" => 255])
|
||||
->addColumn('explanation','text')
|
||||
->addColumn('stripe_charge_id','string',["limit" => 255])
|
||||
->addColumn('stripe_dispute_id','string',["limit" => 255])
|
||||
->addColumn('status','string',["limit" => 255])
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('dispute')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+60
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* refund Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class refund extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('refund');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('refund');
|
||||
$table->addColumn('order_id','integer')
|
||||
->addColumn('user_id','integer')
|
||||
->addColumn('amount','string',["limit" => 255])
|
||||
->addColumn('reason','string',["limit" => 255])
|
||||
->addColumn('explanation','text')
|
||||
->addColumn('receipt_url','string',["limit" => 255])
|
||||
->addColumn('stripe_charge_id','string',["limit" => 255])
|
||||
->addColumn('stripe_invoice_id','string',["limit" => 255])
|
||||
->addColumn('status','string',["limit" => 255])
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('refund')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+58
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* userCard Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class userCard extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('user_card');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('user_card');
|
||||
$table->addColumn('is_default','integer')
|
||||
->addColumn('user_id','integer')
|
||||
->addColumn('stripe_card_id','text')
|
||||
->addColumn('last4','string',["limit" => 255])
|
||||
->addColumn('brand','string',["limit" => 255])
|
||||
->addColumn('exp_month','string',["limit" => 255])
|
||||
->addColumn('exp_year','string',["limit" => 255])
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('user_card')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* urlRedirect Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class urlRedirect extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$exists = $this->hasTable('url_redirect');
|
||||
if (!$exists)
|
||||
{
|
||||
$table = $this->table('url_redirect');
|
||||
$table->addColumn('url','text')
|
||||
->addColumn('rewrite_url','text')
|
||||
->addColumn('created_at','date')
|
||||
->addColumn('updated_at','datetime')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('url_redirect')->drop()->save();
|
||||
}
|
||||
}
|
||||
Executable
+1
@@ -0,0 +1 @@
|
||||
Access Denied
|
||||
Executable
+51
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
|
||||
use Phinx\Seed\AbstractSeed;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* classes Seeder
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class classesSeeder extends AbstractSeed
|
||||
{
|
||||
/**
|
||||
* Run Method.
|
||||
*
|
||||
* Write your database seeder using this method.
|
||||
*
|
||||
* More information on writing seeders is available here:
|
||||
* http://docs.phinx.org/en/latest/seeding.html
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'name' => 'CSE101',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'name' => 'LAW101',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'name' => 'PHY101',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
|
||||
];
|
||||
$model = $this->table('classes');
|
||||
$model->truncate();
|
||||
$model->insert($data)->save();
|
||||
}
|
||||
}
|
||||
Executable
+312
@@ -0,0 +1,312 @@
|
||||
<?php
|
||||
|
||||
|
||||
use Phinx\Seed\AbstractSeed;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* content Seeder
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class contentSeeder extends AbstractSeed
|
||||
{
|
||||
/**
|
||||
* Run Method.
|
||||
*
|
||||
* Write your database seeder using this method.
|
||||
*
|
||||
* More information on writing seeders is available here:
|
||||
* http://docs.phinx.org/en/latest/seeding.html
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'content_name' => 'home_page_meta_title',
|
||||
'content_type' => '1',
|
||||
'content' => 'Outline Gurus',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'buy_page_meta_title',
|
||||
'content_type' => '1',
|
||||
'content' => 'Outline Gurus',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'buy_page_meta_description',
|
||||
'content_type' => '1',
|
||||
'content' => 'Outline Gurus',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'home_page_meta_description',
|
||||
'content_type' => '1',
|
||||
'content' => 'Outline Gurus',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'sell_page_meta_title',
|
||||
'content_type' => '1',
|
||||
'content' => 'Outline Gurus',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'sell_page_meta_description',
|
||||
'content_type' => '1',
|
||||
'content' => 'Outline Gurus',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'contact_page_meta_title',
|
||||
'content_type' => '1',
|
||||
'content' => 'Outline Gurus',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'contact_page_meta_description',
|
||||
'content_type' => '1',
|
||||
'content' => 'Outline Gurus',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'sell_page_main_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'Sell Outlines and Lecture Notes',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'terms_conditon',
|
||||
'content_type' => '1',
|
||||
'content' => 'Terms and Condition',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'privacy_policy',
|
||||
'content_type' => '1',
|
||||
'content' => 'Privacy Policy',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'sell_page_sub_heading',
|
||||
'content_type' => '1',
|
||||
'content' => '',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'main_page_sub_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'Law School Outlines and Lecture Notes Written by Students for Students',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'main_page_left_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'Search by school, professor, course, & year',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'main_page_left_sub_heading',
|
||||
'content_type' => '1',
|
||||
'content' => '<p>Preview, Word Count, Ratings and reviews</p><p>Satisfaction Guaranteed</p>',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'main_page_right_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'Sell Your Outlines & Lecture Notes',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'main_page_right_sub_heading',
|
||||
'content_type' => '1',
|
||||
'content' => '<p>Make money selling your Outlines and Lecture Notes!</p><p>Get 20% of Sales Forever!</p>',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'main_page_imag1_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'About Us',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'main_page_imag1_description',
|
||||
'content_type' => '1',
|
||||
'content' => 'We aim to be the go-to destination for law school students to get the very best outlines and lecture notes for an affordable price. Our platform gives authors an incentive to create and post the very best outlines while giving buyers the most information possible before making a purchase.',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'main_page_imag2_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'Are you an Author?',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'main_page_imag2_description',
|
||||
'content_type' => '1',
|
||||
'content' => 'We value your work and believe you should have ownership over your content. For uploading your document you are entitled to 20% of all proceeds from the sale of your outline into perpetuity. Meaning forever!! Additionally, we guarantee your outline and lecture notes will be automatically accepted on to our platform. We are not the gatekeepers to your work, the buying community will be. We will notify authors if any of the work they have submitted have been marked by buyers for violating our terms and conditions. Otherwise buyers can expect immediate acceptance of their documents and 20% of sales as soon as they click submit.',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'main_page_imag3_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'Thinking about buying?',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'main_page_imag3_description',
|
||||
'content_type' => '1',
|
||||
'content' => 'You deserve to know what you are buying before you buy it. Outlines and lecture notes are an essential tool during your semester of studies as well as a tool during exam prep. There's nothing worse than buying an outline without knowing how long it is, what year it was created or if it's and good. Buyers will be able to clearly see the word count and the year it was created prior to purchasing an outline. In addition buyers will be able to see how prior buyers have rated and reviewed the outlines, ensuring you are buying a great outline. If that's not enough, we ensure any buyer who purchases an outline and is not satisfied will be able to download another similar outline for free. Buyers can buy with confidence with ZERO regrets.',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'circle_icon_1_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'Made for Your Course & Professor',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'circle_icon_1_sub_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'Tailored to your needs for optimal exam preparation',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'circle_icon_2_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'Word Count',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'circle_icon_2_sub_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'Longer is not always better but it doesn't hurt!',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'circle_icon_3_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'Ratings & reviews',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'circle_icon_3_sub_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'See prior buyers ratings and reviews',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'circle_icon_4_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'Satisfaction Guaranteed',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'circle_icon_4_sub_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'Not Satisfied? <br> Let us know within 24 hours and you will be able to download a similar outline for free',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
|
||||
];
|
||||
$model = $this->table('content');
|
||||
$model->truncate();
|
||||
$model->insert($data)->save();
|
||||
}
|
||||
}
|
||||
Executable
+55
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
|
||||
use Phinx\Seed\AbstractSeed;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* credential Seeder
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class credentialSeeder extends AbstractSeed
|
||||
{
|
||||
/**
|
||||
* Run Method.
|
||||
*
|
||||
* Write your database seeder using this method.
|
||||
*
|
||||
* More information on writing seeders is available here:
|
||||
* http://docs.phinx.org/en/latest/seeding.html
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'email' => 'admin@manaknight.com',
|
||||
'password' => str_replace('$2y$', '$2b$', password_hash('a123456', PASSWORD_BCRYPT)),
|
||||
'type' => 'n',
|
||||
'verify' => 1,
|
||||
'role_id' => 2,
|
||||
'user_id' => 1,
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'email' => 'member@manaknight.com',
|
||||
'password' => str_replace('$2y$', '$2b$', password_hash('a123456', PASSWORD_BCRYPT)),
|
||||
'type' => 'n',
|
||||
'verify' => 1,
|
||||
'role_id' => 1,
|
||||
'user_id' => 2,
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
|
||||
];
|
||||
$model = $this->table('credential');
|
||||
$model->truncate();
|
||||
$model->insert($data)->save();
|
||||
}
|
||||
}
|
||||
Executable
+89
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
|
||||
use Phinx\Seed\AbstractSeed;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* email Seeder
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class emailSeeder extends AbstractSeed
|
||||
{
|
||||
/**
|
||||
* Run Method.
|
||||
*
|
||||
* Write your database seeder using this method.
|
||||
*
|
||||
* More information on writing seeders is available here:
|
||||
* http://docs.phinx.org/en/latest/seeding.html
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'slug' => 'reset-password',
|
||||
'subject' => 'Reset your password',
|
||||
'tag' => 'email,reset_token,link',
|
||||
'html' => 'Hi {{{email}}},<br/>You have requested to reset your password. Please click the link below to reset it.<br/><a href="{{{link}}}/{{{reset_token}}}">Link</a>. <br/>Thanks,<br/> Admin',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'slug' => 'register',
|
||||
'subject' => 'Register',
|
||||
'tag' => 'email',
|
||||
'html' => 'Hi {{{email}}},<br/>Thanks for registering on our platform. <br/>Thanks,<br/> Admin',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'slug' => 'confirm-password',
|
||||
'subject' => 'Confirm your account',
|
||||
'tag' => 'email,confirm_token,link',
|
||||
'html' => 'Hi {{{email}}},<br/>Please click the link below to confirm your account.<br/><a href="{{{link}}}/{{{confirm_token}}}">Link</a>Thanks,<br/> Admin',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'slug' => 'verify',
|
||||
'subject' => 'verify your account',
|
||||
'tag' => 'code',
|
||||
'html' => 'Your verification # is {{{code}}}',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'slug' => 'contact',
|
||||
'subject' => 'contact form message',
|
||||
'tag' => 'name,email,message',
|
||||
'html' => 'Sent by {{{name}}} {{{email}}}<br> {{{message}}}',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'slug' => 'give_review',
|
||||
'subject' => 'Leave a Review',
|
||||
'tag' => 'email,link',
|
||||
'html' => 'Hi {{{email}}}, <br> Thankyou from purchasing from OutlineGurus. Please Leave a review for the document or have any complaint tell us. {{{link}}}',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'slug' => 'dispute_added',
|
||||
'subject' => 'A Dispute is Added',
|
||||
'tag' => 'email,order_id',
|
||||
'html' => 'Hi Admin OutlineGurus,<br> User {{{email}}} has opened a dispute for Order# {{{order_id}}} ',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
|
||||
];
|
||||
$model = $this->table('email');
|
||||
$model->truncate();
|
||||
$model->insert($data)->save();
|
||||
}
|
||||
}
|
||||
Executable
+43
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
|
||||
use Phinx\Seed\AbstractSeed;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* image Seeder
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class imageSeeder extends AbstractSeed
|
||||
{
|
||||
/**
|
||||
* Run Method.
|
||||
*
|
||||
* Write your database seeder using this method.
|
||||
*
|
||||
* More information on writing seeders is available here:
|
||||
* http://docs.phinx.org/en/latest/seeding.html
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'url' => 'https://i.imgur.com/AzJ7DRw.png',
|
||||
'caption' => '',
|
||||
'user_id' => 1,
|
||||
'width' => 581,
|
||||
'height' => 581,
|
||||
'type' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
|
||||
];
|
||||
$model = $this->table('image');
|
||||
$model->truncate();
|
||||
$model->insert($data)->save();
|
||||
}
|
||||
}
|
||||
Executable
+40
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
|
||||
use Phinx\Seed\AbstractSeed;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* memberProfile Seeder
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class memberProfileSeeder extends AbstractSeed
|
||||
{
|
||||
/**
|
||||
* Run Method.
|
||||
*
|
||||
* Write your database seeder using this method.
|
||||
*
|
||||
* More information on writing seeders is available here:
|
||||
* http://docs.phinx.org/en/latest/seeding.html
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'user_id' => 2,
|
||||
'username' => 'member',
|
||||
'school_id' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
|
||||
];
|
||||
$model = $this->table('member_profile');
|
||||
$model->truncate();
|
||||
$model->insert($data)->save();
|
||||
}
|
||||
}
|
||||
Executable
+51
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
|
||||
use Phinx\Seed\AbstractSeed;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* professor Seeder
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class professorSeeder extends AbstractSeed
|
||||
{
|
||||
/**
|
||||
* Run Method.
|
||||
*
|
||||
* Write your database seeder using this method.
|
||||
*
|
||||
* More information on writing seeders is available here:
|
||||
* http://docs.phinx.org/en/latest/seeding.html
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'name' => 'Toni Kroos',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'name' => 'Carlos Casemiro',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'name' => 'Luka Modric',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
|
||||
];
|
||||
$model = $this->table('professor');
|
||||
$model->truncate();
|
||||
$model->insert($data)->save();
|
||||
}
|
||||
}
|
||||
Executable
+43
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
|
||||
use Phinx\Seed\AbstractSeed;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* role Seeder
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class roleSeeder extends AbstractSeed
|
||||
{
|
||||
/**
|
||||
* Run Method.
|
||||
*
|
||||
* Write your database seeder using this method.
|
||||
*
|
||||
* More information on writing seeders is available here:
|
||||
* http://docs.phinx.org/en/latest/seeding.html
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'name' => 'member',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'name' => 'admin',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
|
||||
];
|
||||
$model = $this->table('role');
|
||||
$model->truncate();
|
||||
$model->insert($data)->save();
|
||||
}
|
||||
}
|
||||
Executable
+51
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
|
||||
use Phinx\Seed\AbstractSeed;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* school Seeder
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class schoolSeeder extends AbstractSeed
|
||||
{
|
||||
/**
|
||||
* Run Method.
|
||||
*
|
||||
* Write your database seeder using this method.
|
||||
*
|
||||
* More information on writing seeders is available here:
|
||||
* http://docs.phinx.org/en/latest/seeding.html
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'name' => 'Test School',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'name' => 'ABC School',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'name' => 'PQR School',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
|
||||
];
|
||||
$model = $this->table('school');
|
||||
$model->truncate();
|
||||
$model->insert($data)->save();
|
||||
}
|
||||
}
|
||||
Executable
+75
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
|
||||
|
||||
use Phinx\Seed\AbstractSeed;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* setting Seeder
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class settingSeeder extends AbstractSeed
|
||||
{
|
||||
/**
|
||||
* Run Method.
|
||||
*
|
||||
* Write your database seeder using this method.
|
||||
*
|
||||
* More information on writing seeders is available here:
|
||||
* http://docs.phinx.org/en/latest/seeding.html
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'key' => 'fixed_paper_amount',
|
||||
'type' => 0,
|
||||
'value' => '50',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'key' => 'payout_percentage_seller',
|
||||
'type' => 0,
|
||||
'value' => '20',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'key' => 'maintenance',
|
||||
'type' => 1,
|
||||
'value' => '0',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'key' => 'version',
|
||||
'type' => 0,
|
||||
'value' => '1.0.0',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'key' => 'copyright',
|
||||
'type' => 0,
|
||||
'value' => 'Copyright © 2021 Manaknightdigital Inc. All rights reserved.',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'key' => 'license_key',
|
||||
'type' => 4,
|
||||
'value' => '',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
|
||||
];
|
||||
$model = $this->table('setting');
|
||||
$model->truncate();
|
||||
$model->insert($data)->save();
|
||||
}
|
||||
}
|
||||
Executable
+40
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
|
||||
use Phinx\Seed\AbstractSeed;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* sms Seeder
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class smsSeeder extends AbstractSeed
|
||||
{
|
||||
/**
|
||||
* Run Method.
|
||||
*
|
||||
* Write your database seeder using this method.
|
||||
*
|
||||
* More information on writing seeders is available here:
|
||||
* http://docs.phinx.org/en/latest/seeding.html
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'slug' => 'verify',
|
||||
'tag' => 'code',
|
||||
'content' => 'Your verification # is {{{code}}}',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
|
||||
];
|
||||
$model = $this->table('sms');
|
||||
$model->truncate();
|
||||
$model->insert($data)->save();
|
||||
}
|
||||
}
|
||||
Executable
+54
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
|
||||
use Phinx\Seed\AbstractSeed;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* textbook Seeder
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class textbookSeeder extends AbstractSeed
|
||||
{
|
||||
/**
|
||||
* Run Method.
|
||||
*
|
||||
* Write your database seeder using this method.
|
||||
*
|
||||
* More information on writing seeders is available here:
|
||||
* http://docs.phinx.org/en/latest/seeding.html
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'name' => 'Head First Java',
|
||||
'isbn' => 'ISBN_1234567',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'name' => 'Oxford Practice Grammar',
|
||||
'isbn' => 'ISBN_4569821',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'name' => 'Algorithms',
|
||||
'isbn' => 'ISBN_9876545',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
|
||||
];
|
||||
$model = $this->table('textbook');
|
||||
$model->truncate();
|
||||
$model->insert($data)->save();
|
||||
}
|
||||
}
|
||||
Executable
+57
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
|
||||
use Phinx\Seed\AbstractSeed;
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* user Seeder
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class userSeeder extends AbstractSeed
|
||||
{
|
||||
/**
|
||||
* Run Method.
|
||||
*
|
||||
* Write your database seeder using this method.
|
||||
*
|
||||
* More information on writing seeders is available here:
|
||||
* http://docs.phinx.org/en/latest/seeding.html
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'first_name' => 'Admin',
|
||||
'last_name' => 'Admin',
|
||||
'phone' => '12345678',
|
||||
'image' => 'https://i.imgur.com/AzJ7DRw.png',
|
||||
'image_id' => 1,
|
||||
'refer' => 'admin',
|
||||
'profile_id' => 0,
|
||||
'stripe_id' => '',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'first_name' => 'Member',
|
||||
'last_name' => 'Member',
|
||||
'phone' => '12345678',
|
||||
'image' => 'https://i.imgur.com/AzJ7DRw.png',
|
||||
'image_id' => 1,
|
||||
'refer' => 'member',
|
||||
'profile_id' => 0,
|
||||
'stripe_id' => '',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
|
||||
];
|
||||
$model = $this->table('user');
|
||||
$model->truncate();
|
||||
$model->insert($data)->save();
|
||||
}
|
||||
}
|
||||
Executable
+1
@@ -0,0 +1 @@
|
||||
Access Denied
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* spreadsheet Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_spreadsheet extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'name' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'value' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'user_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'status' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('spreadsheet');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('spreadsheet');
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+40
@@ -0,0 +1,40 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* marketing Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_marketing extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'user_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'password_protect' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'content_template_path' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'header_template_path' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'footer_template_path' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'title' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'seo_title' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'seo_description' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'content' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'status' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'publish_date' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'slug' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('marketing');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('marketing');
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+93
@@ -0,0 +1,93 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* setting Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_setting extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'key' => array('type' => 'VARCHAR', 'constraint' => '50'),
|
||||
'type' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'value' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('setting');
|
||||
$this->seed_data();
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('setting');
|
||||
}
|
||||
public function seed_data()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'key' => 'fixed_paper_amount',
|
||||
'type' => 0,
|
||||
'value' => '50',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'key' => 'payout_percentage_seller',
|
||||
'type' => 0,
|
||||
'value' => '20',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'key' => 'maintenance',
|
||||
'type' => 1,
|
||||
'value' => '0',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'key' => 'version',
|
||||
'type' => 0,
|
||||
'value' => '1.0.0',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'key' => 'copyright',
|
||||
'type' => 0,
|
||||
'value' => 'Copyright © 2021 Manaknightdigital Inc. All rights reserved.',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'key' => 'license_key',
|
||||
'type' => 4,
|
||||
'value' => '',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
foreach ($data as $k => $seed )
|
||||
{
|
||||
foreach ($seed as $key => $value)
|
||||
{
|
||||
$seed[$key] = '\'' . addslashes($value) . '\'';
|
||||
}
|
||||
|
||||
$row = array_values($seed);
|
||||
array_unshift($row, (string)($k + 1));
|
||||
$sql = 'INSERT INTO setting VALUES ' . '(' . implode(',', $row) . ')';
|
||||
error_log($sql);
|
||||
$this->db->query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+59
@@ -0,0 +1,59 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* role Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_role extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'name' => array('type' => 'VARCHAR', 'constraint' => '16'),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('role');
|
||||
$this->seed_data();
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('role');
|
||||
}
|
||||
public function seed_data()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'name' => 'member',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'name' => 'admin',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
foreach ($data as $k => $seed )
|
||||
{
|
||||
foreach ($seed as $key => $value)
|
||||
{
|
||||
$seed[$key] = '\'' . addslashes($value) . '\'';
|
||||
}
|
||||
|
||||
$row = array_values($seed);
|
||||
array_unshift($row, (string)($k + 1));
|
||||
$sql = 'INSERT INTO role VALUES ' . '(' . implode(',', $row) . ')';
|
||||
error_log($sql);
|
||||
$this->db->query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* referLog Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_refer_log extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'user_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'referrer_user_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'type' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'status' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('refer_log');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('refer_log');
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+77
@@ -0,0 +1,77 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* credential Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_credential extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'email' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'password' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'type' => array('type' => 'VARCHAR', 'constraint' => '2'),
|
||||
'verify' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'role_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'user_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'status' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('credential');
|
||||
$this->seed_data();
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('credential');
|
||||
}
|
||||
public function seed_data()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'email' => 'admin@manaknight.com',
|
||||
'password' => str_replace('$2y$', '$2b$', password_hash('a123456', PASSWORD_BCRYPT)),
|
||||
'type' => 'n',
|
||||
'verify' => 1,
|
||||
'role_id' => 2,
|
||||
'user_id' => 1,
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'email' => 'member@manaknight.com',
|
||||
'password' => str_replace('$2y$', '$2b$', password_hash('a123456', PASSWORD_BCRYPT)),
|
||||
'type' => 'n',
|
||||
'verify' => 1,
|
||||
'role_id' => 1,
|
||||
'user_id' => 2,
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
foreach ($data as $k => $seed )
|
||||
{
|
||||
foreach ($seed as $key => $value)
|
||||
{
|
||||
$seed[$key] = '\'' . addslashes($value) . '\'';
|
||||
}
|
||||
|
||||
$row = array_values($seed);
|
||||
array_unshift($row, (string)($k + 1));
|
||||
$sql = 'INSERT INTO credential VALUES ' . '(' . implode(',', $row) . ')';
|
||||
error_log($sql);
|
||||
$this->db->query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+81
@@ -0,0 +1,81 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* user Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_user extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'first_name' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'last_name' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'paypal_email' => array('type' => 'VARCHAR', 'constraint' => '500'),
|
||||
'phone' => array('type' => 'VARCHAR', 'constraint' => '50'),
|
||||
'image' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'image_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'refer' => array('type' => 'VARCHAR', 'constraint' => '50'),
|
||||
'profile_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'stripe_id' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('user');
|
||||
$this->seed_data();
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('user');
|
||||
}
|
||||
public function seed_data()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'first_name' => 'Admin',
|
||||
'last_name' => 'Admin',
|
||||
'phone' => '12345678',
|
||||
'image' => 'https://i.imgur.com/AzJ7DRw.png',
|
||||
'image_id' => 1,
|
||||
'refer' => 'admin',
|
||||
'profile_id' => 0,
|
||||
'stripe_id' => '',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'first_name' => 'Member',
|
||||
'last_name' => 'Member',
|
||||
'phone' => '12345678',
|
||||
'image' => 'https://i.imgur.com/AzJ7DRw.png',
|
||||
'image_id' => 1,
|
||||
'refer' => 'member',
|
||||
'profile_id' => 0,
|
||||
'stripe_id' => '',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
foreach ($data as $k => $seed )
|
||||
{
|
||||
foreach ($seed as $key => $value)
|
||||
{
|
||||
$seed[$key] = '\'' . addslashes($value) . '\'';
|
||||
}
|
||||
|
||||
$row = array_values($seed);
|
||||
array_unshift($row, (string)($k + 1));
|
||||
$sql = 'INSERT INTO user VALUES ' . '(' . implode(',', $row) . ')';
|
||||
error_log($sql);
|
||||
$this->db->query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+58
@@ -0,0 +1,58 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* memberProfile Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_member_profile extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'user_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'username' => array('type' => 'VARCHAR', 'constraint' => '50'),
|
||||
'school_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('member_profile');
|
||||
$this->seed_data();
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('member_profile');
|
||||
}
|
||||
public function seed_data()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'user_id' => 2,
|
||||
'username' => 'member',
|
||||
'school_id' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
foreach ($data as $k => $seed )
|
||||
{
|
||||
foreach ($seed as $key => $value)
|
||||
{
|
||||
$seed[$key] = '\'' . addslashes($value) . '\'';
|
||||
}
|
||||
|
||||
$row = array_values($seed);
|
||||
array_unshift($row, (string)($k + 1));
|
||||
$sql = 'INSERT INTO member_profile VALUES ' . '(' . implode(',', $row) . ')';
|
||||
error_log($sql);
|
||||
$this->db->query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* token Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_token extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'token' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'data' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'type' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'user_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'ttl' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'issue_at' => array('type' => 'DATETIME', 'null' => TRUE),
|
||||
'expire_at' => array('type' => 'DATETIME', 'null' => TRUE),
|
||||
'status' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('token');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('token');
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+33
@@ -0,0 +1,33 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* cookies Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_cookies extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'user_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'name' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'value' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'expire' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'domain' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('cookies');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('cookies');
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+110
@@ -0,0 +1,110 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* email Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_email extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'slug' => array('type' => 'VARCHAR', 'constraint' => '50'),
|
||||
'email_header' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'email_footer' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'subject' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'tag' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'html' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('email');
|
||||
$this->seed_data();
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('email');
|
||||
}
|
||||
public function seed_data()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'slug' => 'reset-password',
|
||||
'subject' => 'Reset your password',
|
||||
'tag' => 'email,reset_token,link',
|
||||
'html' => 'Hi {{{email}}},<br/>You have requested to reset your password. Please click the link below to reset it.<br/><a href="{{{link}}}/{{{reset_token}}}">Link</a>. <br/>Thanks,<br/> Admin',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'slug' => 'register',
|
||||
'subject' => 'Register',
|
||||
'tag' => 'email',
|
||||
'html' => 'Hi {{{email}}},<br/>Thanks for registering on our platform. <br/>Thanks,<br/> Admin',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'slug' => 'confirm-password',
|
||||
'subject' => 'Confirm your account',
|
||||
'tag' => 'email,confirm_token,link',
|
||||
'html' => 'Hi {{{email}}},<br/>Please click the link below to confirm your account.<br/><a href="{{{link}}}/{{{confirm_token}}}">Link</a>Thanks,<br/> Admin',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'slug' => 'verify',
|
||||
'subject' => 'verify your account',
|
||||
'tag' => 'code',
|
||||
'html' => 'Your verification # is {{{code}}}',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'slug' => 'contact',
|
||||
'subject' => 'contact form message',
|
||||
'tag' => 'name,email,message',
|
||||
'html' => 'Sent by {{{name}}} {{{email}}}<br> {{{message}}}',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'slug' => 'give_review',
|
||||
'subject' => 'Leave a Review',
|
||||
'tag' => 'email,link',
|
||||
'html' => 'Hi {{{email}}}, <br> Thankyou from purchasing from OutlineGurus. Please Leave a review for the document or have any complaint tell us. {{{link}}}',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'slug' => 'dispute_added',
|
||||
'subject' => 'A Dispute is Added',
|
||||
'tag' => 'email,order_id',
|
||||
'html' => 'Hi Admin OutlineGurus,<br> User {{{email}}} has opened a dispute for Order# {{{order_id}}} ',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
foreach ($data as $k => $seed )
|
||||
{
|
||||
foreach ($seed as $key => $value)
|
||||
{
|
||||
$seed[$key] = '\'' . addslashes($value) . '\'';
|
||||
}
|
||||
|
||||
$row = array_values($seed);
|
||||
array_unshift($row, (string)($k + 1));
|
||||
$sql = 'INSERT INTO email VALUES ' . '(' . implode(',', $row) . ')';
|
||||
error_log($sql);
|
||||
$this->db->query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+58
@@ -0,0 +1,58 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* sms Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_sms extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'slug' => array('type' => 'VARCHAR', 'constraint' => '50'),
|
||||
'tag' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'content' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('sms');
|
||||
$this->seed_data();
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('sms');
|
||||
}
|
||||
public function seed_data()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'slug' => 'verify',
|
||||
'tag' => 'code',
|
||||
'content' => 'Your verification # is {{{code}}}',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
foreach ($data as $k => $seed )
|
||||
{
|
||||
foreach ($seed as $key => $value)
|
||||
{
|
||||
$seed[$key] = '\'' . addslashes($value) . '\'';
|
||||
}
|
||||
|
||||
$row = array_values($seed);
|
||||
array_unshift($row, (string)($k + 1));
|
||||
$sql = 'INSERT INTO sms VALUES ' . '(' . implode(',', $row) . ')';
|
||||
error_log($sql);
|
||||
$this->db->query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+33
@@ -0,0 +1,33 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* adminOperation Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_admin_operation extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'user_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'action' => array('type' => 'VARCHAR', 'constraint' => '50'),
|
||||
'detail' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'last_ip' => array('type' => 'VARCHAR', 'constraint' => '25'),
|
||||
'user_agent' => array('type' => 'VARCHAR', 'constraint' => '100'),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('admin_operation');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('admin_operation');
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+33
@@ -0,0 +1,33 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* memberOperation Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_member_operation extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'user_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'action' => array('type' => 'VARCHAR', 'constraint' => '50'),
|
||||
'detail' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'last_ip' => array('type' => 'VARCHAR', 'constraint' => '25'),
|
||||
'user_agent' => array('type' => 'VARCHAR', 'constraint' => '100'),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('member_operation');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('member_operation');
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+64
@@ -0,0 +1,64 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* image Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_image extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'url' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'caption' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'user_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'width' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'height' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'type' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('image');
|
||||
$this->seed_data();
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('image');
|
||||
}
|
||||
public function seed_data()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'url' => 'https://i.imgur.com/AzJ7DRw.png',
|
||||
'caption' => '',
|
||||
'user_id' => 1,
|
||||
'width' => 581,
|
||||
'height' => 581,
|
||||
'type' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
foreach ($data as $k => $seed )
|
||||
{
|
||||
foreach ($seed as $key => $value)
|
||||
{
|
||||
$seed[$key] = '\'' . addslashes($value) . '\'';
|
||||
}
|
||||
|
||||
$row = array_values($seed);
|
||||
array_unshift($row, (string)($k + 1));
|
||||
$sql = 'INSERT INTO image VALUES ' . '(' . implode(',', $row) . ')';
|
||||
error_log($sql);
|
||||
$this->db->query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+50
@@ -0,0 +1,50 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* inventory Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_inventory extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'user_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'title' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'school_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'professor_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'class_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'textbook_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'word_count' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'year' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'isbn' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'paypal_email' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'file' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'file_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'feature_image' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'feature_image2' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'feature_image3' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'feature_image_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'note_type' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'description' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'inventory_note' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'pin_to_top' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'approve' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'status' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('inventory');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('inventory');
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* notification Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_notification extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'user_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'message' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'url' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'read_status' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('notification');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('notification');
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* review Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_review extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'user_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'inventory_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'order_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'status' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'comment' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'rating' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('review');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('review');
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+33
@@ -0,0 +1,33 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* ticket Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_ticket extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'user_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'order_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'message' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'receive_status' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'status' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('ticket');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('ticket');
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* suggestion Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_suggestion extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'seller_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'name' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'email' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'suggestion_type' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'additional_notes' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'status' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('suggestion');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('suggestion');
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+31
@@ -0,0 +1,31 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* contactUs Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_contact_us extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'name' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'email' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'message' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('contact_us');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('contact_us');
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+36
@@ -0,0 +1,36 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* payout Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_payout extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'user_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'order_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'inventory_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'name' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'email' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'amount' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'payout_date' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'status' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('payout');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('payout');
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+331
@@ -0,0 +1,331 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* content Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_content extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'content_name' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'content_type' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'content' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'status' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('content');
|
||||
$this->seed_data();
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('content');
|
||||
}
|
||||
public function seed_data()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'content_name' => 'home_page_meta_title',
|
||||
'content_type' => '1',
|
||||
'content' => 'Outline Gurus',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'buy_page_meta_title',
|
||||
'content_type' => '1',
|
||||
'content' => 'Outline Gurus',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'buy_page_meta_description',
|
||||
'content_type' => '1',
|
||||
'content' => 'Outline Gurus',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'home_page_meta_description',
|
||||
'content_type' => '1',
|
||||
'content' => 'Outline Gurus',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'sell_page_meta_title',
|
||||
'content_type' => '1',
|
||||
'content' => 'Outline Gurus',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'sell_page_meta_description',
|
||||
'content_type' => '1',
|
||||
'content' => 'Outline Gurus',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'contact_page_meta_title',
|
||||
'content_type' => '1',
|
||||
'content' => 'Outline Gurus',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'contact_page_meta_description',
|
||||
'content_type' => '1',
|
||||
'content' => 'Outline Gurus',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'sell_page_main_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'Sell Outlines and Lecture Notes',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'terms_conditon',
|
||||
'content_type' => '1',
|
||||
'content' => 'Terms and Condition',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'privacy_policy',
|
||||
'content_type' => '1',
|
||||
'content' => 'Privacy Policy',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'sell_page_sub_heading',
|
||||
'content_type' => '1',
|
||||
'content' => '',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'main_page_sub_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'Law School Outlines and Lecture Notes Written by Students for Students',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'main_page_left_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'Search by school, professor, course, & year',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'main_page_left_sub_heading',
|
||||
'content_type' => '1',
|
||||
'content' => '<p>Preview, Word Count, Ratings and reviews</p><p>Satisfaction Guaranteed</p>',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'main_page_right_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'Sell Your Outlines & Lecture Notes',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'main_page_right_sub_heading',
|
||||
'content_type' => '1',
|
||||
'content' => '<p>Make money selling your Outlines and Lecture Notes!</p><p>Get 20% of Sales Forever!</p>',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'main_page_imag1_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'About Us',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'main_page_imag1_description',
|
||||
'content_type' => '1',
|
||||
'content' => 'We aim to be the go-to destination for law school students to get the very best outlines and lecture notes for an affordable price. Our platform gives authors an incentive to create and post the very best outlines while giving buyers the most information possible before making a purchase.',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'main_page_imag2_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'Are you an Author?',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'main_page_imag2_description',
|
||||
'content_type' => '1',
|
||||
'content' => 'We value your work and believe you should have ownership over your content. For uploading your document you are entitled to 20% of all proceeds from the sale of your outline into perpetuity. Meaning forever!! Additionally, we guarantee your outline and lecture notes will be automatically accepted on to our platform. We are not the gatekeepers to your work, the buying community will be. We will notify authors if any of the work they have submitted have been marked by buyers for violating our terms and conditions. Otherwise buyers can expect immediate acceptance of their documents and 20% of sales as soon as they click submit.',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'main_page_imag3_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'Thinking about buying?',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'main_page_imag3_description',
|
||||
'content_type' => '1',
|
||||
'content' => 'You deserve to know what you are buying before you buy it. Outlines and lecture notes are an essential tool during your semester of studies as well as a tool during exam prep. There's nothing worse than buying an outline without knowing how long it is, what year it was created or if it's and good. Buyers will be able to clearly see the word count and the year it was created prior to purchasing an outline. In addition buyers will be able to see how prior buyers have rated and reviewed the outlines, ensuring you are buying a great outline. If that's not enough, we ensure any buyer who purchases an outline and is not satisfied will be able to download another similar outline for free. Buyers can buy with confidence with ZERO regrets.',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'circle_icon_1_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'Made for Your Course & Professor',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'circle_icon_1_sub_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'Tailored to your needs for optimal exam preparation',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'circle_icon_2_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'Word Count',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'circle_icon_2_sub_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'Longer is not always better but it doesn't hurt!',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'circle_icon_3_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'Ratings & reviews',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'circle_icon_3_sub_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'See prior buyers ratings and reviews',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'circle_icon_4_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'Satisfaction Guaranteed',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'content_name' => 'circle_icon_4_sub_heading',
|
||||
'content_type' => '1',
|
||||
'content' => 'Not Satisfied? <br> Let us know within 24 hours and you will be able to download a similar outline for free',
|
||||
'status' => 1,
|
||||
'created_at' => '2021-08-18',
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
foreach ($data as $k => $seed )
|
||||
{
|
||||
foreach ($seed as $key => $value)
|
||||
{
|
||||
$seed[$key] = '\'' . addslashes($value) . '\'';
|
||||
}
|
||||
|
||||
$row = array_values($seed);
|
||||
array_unshift($row, (string)($k + 1));
|
||||
$sql = 'INSERT INTO content VALUES ' . '(' . implode(',', $row) . ')';
|
||||
error_log($sql);
|
||||
$this->db->query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* inventoryGalleryImageList Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_inventory_gallery_image_list extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'inventory_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'gallery_image' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'gallery_image_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'status' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('inventory_gallery_image_list');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('inventory_gallery_image_list');
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* category Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_category extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'name' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'status' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('category');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('category');
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+68
@@ -0,0 +1,68 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* school Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_school extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'name' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'status' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('school');
|
||||
$this->seed_data();
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('school');
|
||||
}
|
||||
public function seed_data()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'name' => 'Test School',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'name' => 'ABC School',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'name' => 'PQR School',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
foreach ($data as $k => $seed )
|
||||
{
|
||||
foreach ($seed as $key => $value)
|
||||
{
|
||||
$seed[$key] = '\'' . addslashes($value) . '\'';
|
||||
}
|
||||
|
||||
$row = array_values($seed);
|
||||
array_unshift($row, (string)($k + 1));
|
||||
$sql = 'INSERT INTO school VALUES ' . '(' . implode(',', $row) . ')';
|
||||
error_log($sql);
|
||||
$this->db->query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+68
@@ -0,0 +1,68 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* professor Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_professor extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'name' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'status' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('professor');
|
||||
$this->seed_data();
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('professor');
|
||||
}
|
||||
public function seed_data()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'name' => 'Toni Kroos',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'name' => 'Carlos Casemiro',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'name' => 'Luka Modric',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
foreach ($data as $k => $seed )
|
||||
{
|
||||
foreach ($seed as $key => $value)
|
||||
{
|
||||
$seed[$key] = '\'' . addslashes($value) . '\'';
|
||||
}
|
||||
|
||||
$row = array_values($seed);
|
||||
array_unshift($row, (string)($k + 1));
|
||||
$sql = 'INSERT INTO professor VALUES ' . '(' . implode(',', $row) . ')';
|
||||
error_log($sql);
|
||||
$this->db->query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+68
@@ -0,0 +1,68 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* classes Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_classes extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'name' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'status' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('classes');
|
||||
$this->seed_data();
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('classes');
|
||||
}
|
||||
public function seed_data()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'name' => 'CSE101',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'name' => 'LAW101',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'name' => 'PHY101',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
foreach ($data as $k => $seed )
|
||||
{
|
||||
foreach ($seed as $key => $value)
|
||||
{
|
||||
$seed[$key] = '\'' . addslashes($value) . '\'';
|
||||
}
|
||||
|
||||
$row = array_values($seed);
|
||||
array_unshift($row, (string)($k + 1));
|
||||
$sql = 'INSERT INTO classes VALUES ' . '(' . implode(',', $row) . ')';
|
||||
error_log($sql);
|
||||
$this->db->query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+72
@@ -0,0 +1,72 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* textbook Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_textbook extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'name' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'isbn' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'status' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('textbook');
|
||||
$this->seed_data();
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('textbook');
|
||||
}
|
||||
public function seed_data()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'name' => 'Head First Java',
|
||||
'isbn' => 'ISBN_1234567',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'name' => 'Oxford Practice Grammar',
|
||||
'isbn' => 'ISBN_4569821',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
[
|
||||
'name' => 'Algorithms',
|
||||
'isbn' => 'ISBN_9876545',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-j'),
|
||||
'updated_at' => date('Y-m-j H:i:s'),
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
foreach ($data as $k => $seed )
|
||||
{
|
||||
foreach ($seed as $key => $value)
|
||||
{
|
||||
$seed[$key] = '\'' . addslashes($value) . '\'';
|
||||
}
|
||||
|
||||
$row = array_values($seed);
|
||||
array_unshift($row, (string)($k + 1));
|
||||
$sql = 'INSERT INTO textbook VALUES ' . '(' . implode(',', $row) . ')';
|
||||
error_log($sql);
|
||||
$this->db->query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+33
@@ -0,0 +1,33 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* cart Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_cart extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'inventory_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'user_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'session_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'subtotal' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'total' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('cart');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('cart');
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+40
@@ -0,0 +1,40 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* order Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_order extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'purchase_user_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'sale_user_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'inventory_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'order_date' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'order_time' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'subtotal' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'tax' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'discount' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'total' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'stripe_charge_id' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'stripe_intent' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'status' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('order');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('order');
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* tax Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_tax extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'tax_rate' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('tax');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('tax');
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+39
@@ -0,0 +1,39 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* transaction Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_transaction extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'order_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'user_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'transaction_date' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'transaction_time' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'subtotal' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'tax' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'discount' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'total' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'stripe_charge_id' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'payment_method' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'status' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('transaction');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('transaction');
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* orderNotes Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_order_notes extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'order_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'description' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('order_notes');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('order_notes');
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+36
@@ -0,0 +1,36 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* dispute Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_dispute extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'order_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'user_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'amount' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'reason' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'explanation' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'stripe_charge_id' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'stripe_dispute_id' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'status' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('dispute');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('dispute');
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+37
@@ -0,0 +1,37 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* refund Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_refund extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'order_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'user_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'amount' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'reason' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'explanation' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'receipt_url' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'stripe_charge_id' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'stripe_invoice_id' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'status' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('refund');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('refund');
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+35
@@ -0,0 +1,35 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* userCard Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_user_card extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'is_default' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'user_id' => array('type' => 'INT', 'constraint' => 11, 'null' => TRUE),
|
||||
'stripe_card_id' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'last4' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'brand' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'exp_month' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'exp_year' => array('type' => 'VARCHAR', 'constraint' => '255'),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('user_card');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('user_card');
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* urlRedirect Migration
|
||||
*
|
||||
* @copyright 2019 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*/
|
||||
class Migration_url_redirect extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field([ 'id' => array('type' => 'INT','constraint' => 11,'unsigned' => TRUE,'auto_increment' => TRUE),
|
||||
'url' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'rewrite_url' => array('type' => 'TEXT', 'null' => TRUE),
|
||||
'created_at' => array('type' => 'DATE', 'null' => TRUE),
|
||||
'updated_at' => array('type' => 'DATETIME', 'null' => TRUE)]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('url_redirect');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('url_redirect');
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+1
@@ -0,0 +1 @@
|
||||
Access Denied
|
||||
Reference in New Issue
Block a user