abstract public function tables();
484045
public function up()
    {
        $this->load->helper('date');
        $is_datetime = strtolower(Model::TIMESTAMP_FORMAT) == 'datetime';

        foreach ($this->tables() as $name => $prop) {
            $keys = [];
            $is_auto_timestamp = element(self::FLAG_AUTOTIMESTAMP, $prop, true);

            if ($schemas = element(self::DB_SCHEMAS, $prop, [])) {
                if (true === $is_auto_timestamp) {
                    $this->_auto_timestamp = true;
                    $creator = ['type' => 'int', 'constraint' => 11, 'unsigned' => true, 'default' => null];

                    if ($is_datetime) {
                        $timestamp = ['type' => 'datetime', 'default' => '0000-00-00 00:00:00'];
                    } else {
                        $timestamp = ['type' => 'int', 'constraint' => 11, 'unsigned' => true, 'default' => 0];
                    }

                    $schemas[Model::CREATION_KEY.'_by']     = $creator;
                    $schemas[Model::CREATION_KEY.'_at']     = $timestamp;
                    $schemas[Model::MODIFICATION_KEY.'_by'] = $creator;
                    $schemas[Model::MODIFICATION_KEY.'_at'] = $timestamp;
                }

                if (false === element(self::FLAG_DESTRUCTIVE, $prop, false)) {
                    $schemas[Model::DELETION_KEY] = ['type' => 'tinyint', 'constraint' => 1, 'unsigned' => true, 'DEFAULT' => 0];
                }

                foreach ($schemas as $column => $schema) {
                    if (isset($schema['key'])) {
                        $keys[$column] = $schema['key'];
                        unset($schema['key']);
                    }
                }

                if (true === element(self::FLAG_OVERRIDE, $prop, true)) {
                    $this->dbforge->drop_table($name, true);
                }

                $this->dbforge->add_field($schemas);

                if (! empty($keys)) {
                    foreach ($keys as $key => $value) {
                        $this->dbforge->add_key($key, $value);
                    }
                }

                if (false === element(self::FLAG_ALTERTABLE, $prop, false)) {
                    if ($this->dbforge->create_table($name, true, ['engine' => 'InnoDB'])) {
                        log_message('info', 'Migration successfully create table '.$name);
                    } else {
                        log_message('error', 'Migration failed to create table '.$name);
                    }
                }
            }

            if ($data = element(self::DB_DATA, $prop, [])) {
                if (true === $is_auto_timestamp) {
                    $now = $is_datetime ? date('Y-m-d H:i:s') : time();

                    for ($d = 0; $d < count($data); $d++) {
                        $data[$d] += [
                            Model::CREATION_KEY.'_by'     => null,
                            Model::CREATION_KEY.'_at'     => $now,
                            Model::MODIFICATION_KEY.'_by' => null,
                            Model::MODIFICATION_KEY.'_at' => $now,
                        ];
                    }
                }

                if ($this->db->insert_batch($name, $data)) {
                    log_message('info', 'Migration successfully insert data to table '.$name);
                }
            }
        }
    }
527924
public function getTables()
    {
        if (is_null($this->_aTables)) {
            $aTables = $this->formDatabaseTablesArray();
            $this->setTables($aTables);
        }

        return $this->_aTables;
    }
997174
protected function registerTables()
    {
        $tables = $this->container->make('config')->get('swoole.tables', []);

        foreach ($tables as $key => $value) {
            $table   = new SwooleTable($value['size']);
            $columns = $value['columns'] ?? [];
            foreach ($columns as $column) {
                if (isset($column['size'])) {
                    $table->column($column['name'], $column['type'], $column['size']);
                } else {
                    $table->column($column['name'], $column['type']);
                }
            }
            $table->create();

            $this->currentTable->add($key, $table);
        }
    }
576661
private void addTables()
    {
        for (final SQLTable table : getType().getTables()) {
            if (!getTable2values().containsKey(table)) {
                getTable2values().put(table, new ArrayList<Value>());
            }
        }
    }
76920
protected function loadCustomTables()
    {
        if ($config = $this->loadConfigFile('tables.php')) {
            $app = $this->app;

            foreach ($config as $installerClass) {
                if (is_string($installerClass) && is_subclass_of($installerClass, 'Tev\Database\CustomTables\AbstractInstaller')) {
                    register_activation_hook($this->getPluginFile(), function () use ($installerClass, $app) {
                        global $wpdb;
                        $installer = new $installerClass($wpdb, $app);
                        $installer->install();
                    });

                    add_action('plugins_loaded', function () use ($installerClass, $app) {
                        global $wpdb;
                        $installer = new $installerClass($wpdb, $app);
                        $installer->update();
                    });
                }
            }
        }

        return $this;
    }
1049319
protected function generateTablesAndIndices( array $tables )
	{
		$this->method = 'create';

		foreach ( $tables as $table ) {
			$this->table = $table;
			$this->migrationName = 'create_'. $this->table .'_table';
			$this->fields = $this->schemaGenerator->getFields( $this->table );

			$this->generate();
		}
	}
1207012
public void setTables(final List<Table> tables) {
        this.tablesMap.clear();
        for (final Table table : tables)
            this.addTableConfig(table.getConfigEntry());
    }
946031
def tables(self):
        
        _tables = set()

        for attr in six.itervalues(self.__dict__):
            if isinstance(attr, list):
                for item in attr:
                    if isinstance(item, Node):
                        _tables |= item.tables()
            elif isinstance(attr, Node):
                _tables |= attr.tables()

        return _tables
143308
protected function createTables()
    {
        $this->createTable(static::tableName(), [
            'objectId' => $this->string()->notNull(),
            'elementId' => $this->integer()->notNull(),
            'fieldId' => $this->integer()->notNull(),
            'siteId' => $this->integer()->notNull(),
            'sortOrder' => $this->smallInteger()->unsigned(),
            'dateCreated' => $this->dateTime()->notNull(),
            'dateUpdated' => $this->dateTime()->notNull(),
            'uid' => $this->uid(),
        ]);
    }
254172
final public function showTables()
	{
		$q = $this->query('SHOW TABLES');
		$q->execute();
		return $q->fetchAll(self::FETCH_COLUMN);
	}
1022366
protected function loadModelTables()
    {
        $reader = $this->getModelReader();
        $tables = [];

        while ($reader->read()) {
            if ($reader->isModelTable()) {
                if ($table = $this->loadModelTable($reader->expand())) {
                    $tables[$table->getId()] = $table;
                } // if
            } // if
        } // while

        return $tables;
    }
355545
protected function getTable(): Table
    {
        if ($this->table === null) {
            $this->table = new Table($this->output);
        }
        return $this->table;
    }
185503
public function tableCommand(): void
    {
        $data = [
            [
                'id'     => 1,
                'name'   => 'john',
                'status' => 2,
                'email'  => 'john@email.com',
            ],
            [
                'id'     => 2,
                'name'   => 'tom',
                'status' => 0,
                'email'  => 'tom@email.com',
            ],
            [
                'id'     => 3,
                'name'   => 'jack',
                'status' => 1,
                'email'  => 'jack-test@email.com',
            ],
        ];
        Show::table($data, 'table show');

        Show::table($data, 'No border table show', [
            'showBorder' => 0
        ]);

        Show::table($data, 'change style table show', [
            'bodyStyle' => 'info'
        ]);

        $data1 = [
            [
                'Walter White',
                'Father',
                'Teacher',
            ],
            [
                'Skyler White',
                'Mother',
                'Accountant',
            ],
            [
                'Walter White Jr.',
                'Son',
                'Student',
            ],
        ];

        Show::table($data1, 'no head table show');
    }
1251069
function &TableInfo()
	{
	global $_ADODB_ACTIVE_DBS;

		$activedb = $_ADODB_ACTIVE_DBS[$this->_dbat];
		$table = $activedb->tables[$this->_tableat];
		return $table;
	}
45069
public function createTables()
    {
        $db = $this->getDb();
        $prefixTables = $this->getTablePrefix();

        $tablesAlreadyInstalled = $this->getTablesInstalled();
        $tablesToCreate = $this->getTablesCreateSql();
        unset($tablesToCreate['archive_blob']);
        unset($tablesToCreate['archive_numeric']);

        foreach ($tablesToCreate as $tableName => $tableSql) {
            $tableName = $prefixTables . $tableName;
            if (!in_array($tableName, $tablesAlreadyInstalled)) {
                $db->query($tableSql);
            }
        }
    }
784210
public function from($tables = null): IQueryBuilderHandler
    {
        if ($tables === null) {
            $this->statements['tables'] = null;

            return $this;
        }

        if (\is_array($tables) === false) {
            $tables = \func_get_args();
        }

        $tTables = [];

        foreach ((array)$tables as $key => $value) {
            if (\is_string($key) === true) {
                $this->alias($value, $key);
                $tTables[] = $key;
                continue;
            }

            $tTables[] = $value;
        }

        $tTables = $this->addTablePrefix($tTables, false);
        $this->statements['tables'] = $tTables;

        return $this;
    }
408006
private function check_tables() {
		$tab = new AdminStoreTables();
		$tab::init($this);
		$force = $this->force_create_table;
		if ($tab::exists($force)) {
			if (!$force)
				$tab::upgrade();
			$tab::deinit();
			return;
		}
		$tab::install($this->expiration);
		$tab::deinit();
	}