add kulcsok, add tartós beszedés, add ticket type with intallments

This commit is contained in:
2016-01-20 14:48:34 +01:00
parent d1638a19de
commit d7cc84e78f
111 changed files with 4077 additions and 12 deletions

View File

@@ -0,0 +1,38 @@
<?php
use yii\db\Migration;
class m160117_182720_add_card_key_assignment extends Migration
{
public function up()
{
$tableOptions = null;
if ($this->db->driverName === 'mysql') {
// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
}
$this->createTable('{{%card_key_assignment}}', [
'id_card' => $this->integer(11),
'id_key' => $this->integer(11),
'id_user' => $this->integer(11),
'created_at' => $this->dateTime()->notNull(),
'updated_at' => $this->dateTime()->notNull(),
], $tableOptions);
}
public function down()
{
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}

View File

@@ -0,0 +1,29 @@
<?php
use yii\db\Schema;
use yii\db\Migration;
class m160119_103347_alter__table__ticket_type__add_installment_fields extends Migration
{
public function up()
{
$this->addColumn("ticket_type", "installment_enabled", "int default 0");
$this->addColumn("ticket_type", "installment_count", "int");
$this->addColumn("ticket_type", "installment_money", "int");
}
public function down()
{
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}

View File

@@ -0,0 +1,50 @@
<?php
use yii\db\Schema;
use yii\db\Migration;
class m160119_110151_create__table__ticket__installment_request extends Migration
{
public function up()
{
$tableOptions = null;
if ($this->db->driverName === 'mysql') {
// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
}
$this->createTable('{{%ticket_installment_request}}', [
'id_ticket_installment_request' => $this->primaryKey(),
'id_ticket' => $this->integer(11),
'id_customer' => $this->integer(11),
'id_transfer' => $this->integer(11),
'status' => $this->integer(11),
'money' => $this->integer(11),
'customer_name' => $this->string(),
'bank_name' => $this->string(),
'bank_address' => $this->string(),
'bank_account' => $this->string(),
'priority' => $this->integer(11),
'request_sent_at' => $this->dateTime(),
'request_processed_at' => $this->dateTime(),
'request_target_time_at' => $this->dateTime(),
'created_at' => $this->dateTime()->notNull(),
'updated_at' => $this->dateTime()->notNull(),
], $tableOptions);
}
public function down()
{
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}

View File

@@ -0,0 +1,52 @@
<?php
use yii\db\Schema;
use yii\db\Migration;
class m160120_044951_add__ugiro_tables extends Migration
{
public function up()
{
$tableOptions = null;
if ($this->db->driverName === 'mysql') {
// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
}
$this->createTable('{{%ugiro}}', [
'id_ugiro' => $this->primaryKey(),
'id_user' => $this->integer(11),
'created_at' => $this->dateTime()->notNull(),
'updated_at' => $this->dateTime()->notNull(),
], $tableOptions);
$tableOptions = null;
if ($this->db->driverName === 'mysql') {
// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
}
$this->createTable('{{%ugiro_request_assignment}}', [
'id_ugiro_request_assignment' => $this->primaryKey(),
'id_ugiro' => $this->integer(11),
'id_request' => $this->integer(11),
'created_at' => $this->dateTime()->notNull(),
'updated_at' => $this->dateTime()->notNull(),
], $tableOptions);
}
public function down()
{
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}

View File

@@ -0,0 +1,30 @@
<?php
use yii\db\Schema;
use yii\db\Migration;
class m160120_050556_alter__table__ugiro_add_column_path extends Migration
{
public function up()
{
$this->addColumn("ugiro", "path", "string");
}
public function down()
{
echo "m160120_050556_alter__table__ugiro_add_column_path cannot be reverted.\n";
return false;
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}

View File

@@ -0,0 +1,31 @@
<?php
use yii\db\Schema;
use yii\db\Migration;
class m160120_054556_alter__table__customer__add__column__bankaccount extends Migration
{
public function up()
{
$this->addColumn("customer", "bank_account", "string");
$this->addColumn("customer", "bank_name", "string");
}
public function down()
{
echo "m160120_054556_alter__table__customer__add__column__bankaccount cannot be reverted.\n";
return false;
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}

View File

@@ -0,0 +1,27 @@
<?php
use yii\db\Schema;
use yii\db\Migration;
class m160120_093445_alter__table__ugiro__add__status extends Migration
{
public function up()
{
$this->addColumn("ugiro", "status", "int");
}
public function down()
{
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}