destructr/tests/Drivers/FactorySchemaB.php
Joby Elliott 0d1677a9b4
Schema management (#1)
* saves schemas to database, uses those schemas - still need to finish methods for update/add/remove operations on columns, for updating schemas

* fix for schema table creation

* possible test fixes

* possibly working, dropped some non-integration tests that didn't work with schema changes

* seems working, but still needs schema updating

* mysql's schema updates seem to be working

* mariadb driver tests

* change to how saving schema for createTable works

* very basic tests for schema management

* test that schemas are updated in schema table
2020-08-29 15:28:45 -06:00

30 lines
843 B
PHP

<?php
/* Destructr | https://github.com/jobyone/destructr | MIT License */
declare (strict_types = 1);
namespace Destructr\Drivers;
use Destructr\Factory;
class FactorySchemaB extends Factory
{
public $schema = [
'dso.id' => [
'name' => 'dso_id', //column name to be used
'type' => 'VARCHAR(16)', //column type
'index' => 'BTREE', //whether/how to index
'unique' => true, //whether column should be unique
'primary' => true, //whether column should be the primary key
],
'test.a' => [
'name' => 'test_a_2',
'type' => 'VARCHAR(100)',
'index' => 'BTREE',
]
,
'test.c' => [
'name' => 'test_c',
'type' => 'VARCHAR(100)',
'index' => 'BTREE',
],
];
}