예제 #1
0
 /**
  * @codeCoverageIgnore
  */
 public function getDefaultTableCharset()
 {
     return Db::getDefaultTableCharset();
 }
예제 #2
0
 /**
  * @codeCoverageIgnore
  */
 protected function createTable()
 {
     $this->db->createTable($this->table, null, ['columns' => [new Column('id', ['type' => Column::TYPE_BIGINTEGER, 'size' => 20, 'unsigned' => true, 'notNull' => true, 'primary' => true, 'autoIncrement' => true]), new Column('connection', ['type' => Column::TYPE_TEXT, 'notNull' => false]), new Column('queue', ['type' => Column::TYPE_TEXT, 'notNull' => false]), new Column('payload', ['type' => 'LONGTEXT', 'notNull' => false]), new Column('failed_at', ['type' => Column::TYPE_TIMESTAMP, 'notNull' => true, 'default' => 'CURRENT_TIMESTAMP'])], 'options' => ['TABLE_COLLATION' => Db::getDefaultTableCharset()]]);
 }
예제 #3
0
 protected function createTable()
 {
     $db = Db::connection();
     $db->createTable($this->_table, null, ['columns' => [new Column('id', ['type' => Column::TYPE_BIGINTEGER, 'size' => 20, 'unsigned' => true, 'notNull' => true, 'primary' => true]), new Column('username', ['type' => Column::TYPE_VARCHAR, 'size' => 20, 'notNull' => false]), new Column('email', ['type' => Column::TYPE_VARCHAR, 'size' => 255, 'notNull' => false]), new Column('mobile', ['type' => Column::TYPE_VARCHAR, 'size' => 20, 'notNull' => false]), new Column('password', ['type' => Column::TYPE_VARCHAR, 'size' => 160, 'notNull' => true]), new Column('confirmed', ['type' => Column::TYPE_BOOLEAN, 'size' => 1, 'unsigned' => true, 'notNull' => true, 'default' => 0]), new Column('created_at', ['type' => Column::TYPE_BIGINTEGER, 'size' => 20, 'unsigned' => true, 'notNull' => false]), new Column('updated_at', ['type' => Column::TYPE_BIGINTEGER, 'size' => 20, 'unsigned' => true, 'notNull' => false])], 'indexes' => [new Index('username', ['username'], 'UNIQUE'), new Index('email', ['email'], 'UNIQUE'), new Index('mobile', ['mobile'], 'UNIQUE')], 'options' => ['TABLE_COLLATION' => Db::getDefaultTableCharset()]]);
 }
예제 #4
0
 public function testGetDefaultTableCharset()
 {
     $this->assertEquals('utf8_unicode_ci', Db::getDefaultTableCharset());
 }
예제 #5
0
 protected function createTable()
 {
     $db = Db::connection();
     $db->createTable($this->_table, null, ['columns' => [new Column('id', ['type' => Column::TYPE_BIGINTEGER, 'size' => 20, 'unsigned' => true, 'notNull' => true, 'primary' => true]), new Column('prefixed_order_id', ['type' => Column::TYPE_VARCHAR, 'size' => 50, 'notNull' => true]), new Column('trade_id', ['type' => Column::TYPE_VARCHAR, 'size' => 50, 'notNull' => true]), new Column('txn_id', ['type' => Column::TYPE_VARCHAR, 'size' => 100, 'notNull' => false]), new Column('product_name', ['type' => Column::TYPE_VARCHAR, 'size' => 50, 'notNull' => true]), new Column('user_identifier', ['type' => Column::TYPE_VARCHAR, 'size' => 50, 'notNull' => false]), new Column('client_id', ['type' => Column::TYPE_VARCHAR, 'size' => 50, 'notNull' => true]), new Column('payment_gateway', ['type' => Column::TYPE_VARCHAR, 'size' => 50, 'notNull' => false]), new Column('payment_method', ['type' => Column::TYPE_VARCHAR, 'size' => 50, 'notNull' => false]), new Column('amount', ['type' => Column::TYPE_DECIMAL, 'size' => 10, 'scale' => 2, 'unsigned' => true, 'notNull' => true, 'default' => 0]), new Column('discount_amount', ['type' => Column::TYPE_DECIMAL, 'size' => 10, 'scale' => 2, 'unsigned' => true, 'notNull' => true, 'default' => 0]), new Column('cash_to_pay', ['type' => Column::TYPE_DECIMAL, 'size' => 10, 'scale' => 2, 'unsigned' => true, 'notNull' => true, 'default' => 0]), new Column('cash_paid', ['type' => Column::TYPE_DECIMAL, 'size' => 10, 'scale' => 2, 'unsigned' => true, 'notNull' => true, 'default' => 0]), new Column('currency', ['type' => Column::TYPE_VARCHAR, 'size' => 10, 'notNull' => false]), new Column('amount_in_currency', ['type' => Column::TYPE_DECIMAL, 'size' => 10, 'scale' => 2, 'unsigned' => true, 'notNull' => true, 'default' => 0]), new Column('status', ['type' => Column::TYPE_VARCHAR, 'size' => 50, 'notNull' => false]), new Column('created_at', ['type' => Column::TYPE_BIGINTEGER, 'size' => 20, 'unsigned' => true, 'notNull' => false]), new Column('completed_at', ['type' => Column::TYPE_BIGINTEGER, 'size' => 20, 'unsigned' => true, 'notNull' => false]), new Column('canceled_at', ['type' => Column::TYPE_BIGINTEGER, 'size' => 20, 'unsigned' => true, 'notNull' => false]), new Column('failed_at', ['type' => Column::TYPE_BIGINTEGER, 'size' => 20, 'unsigned' => true, 'notNull' => false]), new Column('callback_url', ['type' => Column::TYPE_VARCHAR, 'size' => 255, 'notNull' => false]), new Column('callback_status', ['type' => Column::TYPE_VARCHAR, 'size' => 50, 'notNull' => false]), new Column('callback_next_retry', ['type' => Column::TYPE_BIGINTEGER, 'size' => 20, 'unsigned' => true, 'notNull' => false])], 'indexes' => [new Index('trade_id', ['trade_id', 'client_id'], 'UNIQUE'), new Index('prefixed_order_id', ['prefixed_order_id'], 'UNIQUE'), new Index('user_identifier', ['user_identifier', 'client_id'])], 'options' => ['TABLE_COLLATION' => Db::getDefaultTableCharset()]]);
 }
예제 #6
0
 protected function createTable()
 {
     $db = Db::connection();
     $db->createTable($this->_table, null, ['columns' => [new Column('user_id', ['type' => Column::TYPE_BIGINTEGER, 'size' => 20, 'unsigned' => true, 'notNull' => true, 'primary' => true]), new Column('real_name', ['type' => Column::TYPE_VARCHAR, 'size' => 32, 'notNull' => false]), new Column('avatar', ['type' => Column::TYPE_VARCHAR, 'size' => 255, 'notNull' => true, 'default' => '']), new Column('remember_token', ['type' => Column::TYPE_VARCHAR, 'size' => 52, 'notNull' => false]), new Column('extra_data', ['type' => Column::TYPE_TEXT, 'notNull' => false])], 'references' => [new Reference('user_profile_users_user_id', ['referencedTable' => 'users', 'columns' => ['user_id'], 'referencedColumns' => ['id'], 'onDelete' => 'CASCADE', 'onUpdate' => 'CASCADE'])], 'options' => ['TABLE_COLLATION' => Db::getDefaultTableCharset()]]);
 }
예제 #7
0
 protected function createTable()
 {
     $db = Db::connection();
     $db->createTable($this->_table, null, ['columns' => [new Column('order_id', ['type' => Column::TYPE_BIGINTEGER, 'size' => 20, 'unsigned' => true, 'notNull' => true, 'primary' => true]), new Column('request_data', ['type' => Column::TYPE_TEXT, 'notNull' => false]), new Column('data', ['type' => Column::TYPE_TEXT, 'notNull' => false]), new Column('status_history', ['type' => Column::TYPE_TEXT, 'notNull' => false])], 'options' => ['TABLE_COLLATION' => Db::getDefaultTableCharset()]]);
 }