first commit

This commit is contained in:
ryanwong
2022-06-30 05:46:02 -04:00
commit a96eaec33b
859 changed files with 199842 additions and 0 deletions
+55
View File
@@ -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();
}
}
+64
View File
@@ -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();
}
}
+55
View File
@@ -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();
}
}
+53
View File
@@ -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();
}
}
+55
View File
@@ -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();
}
}
+58
View File
@@ -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();
}
}
+60
View File
@@ -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
View File
@@ -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();
}
}
+57
View File
@@ -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();
}
}
+56
View File
@@ -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();
}
}
+58
View File
@@ -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();
}
}
+55
View File
@@ -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
View File
@@ -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
View File
@@ -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();
}
}
+57
View File
@@ -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();
}
}
+73
View File
@@ -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();
}
}
+55
View File
@@ -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();
}
}
+57
View File
@@ -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();
}
}
+56
View File
@@ -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();
}
}
+57
View File
@@ -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();
}
}
+54
View File
@@ -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();
}
}
+59
View File
@@ -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();
}
}
+55
View File
@@ -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();
}
}
+53
View File
@@ -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();
}
}
+53
View File
@@ -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();
}
}
+53
View File
@@ -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();
}
}
+53
View File
@@ -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();
}
}
+54
View File
@@ -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();
}
}
+56
View File
@@ -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();
}
}
+63
View File
@@ -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();
}
}
+52
View File
@@ -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();
}
}
+62
View File
@@ -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();
}
}
+53
View File
@@ -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();
}
}
+59
View File
@@ -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();
}
}
+60
View File
@@ -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();
}
}
+58
View File
@@ -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();
}
}
+53
View File
@@ -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();
}
}
+1
View File
@@ -0,0 +1 @@
Access Denied