public function actionCreate()
    {
        $stdout = '';
        foreach ($this->db->schema->getTableSchemas() as $table) {
            if ($table->name === $this->migrationTable) {
                continue;
            }
            $stdout .= static::generateCreateTable($table->name).
                static::generateColumns($table->columns, $this->db->schema->findUniqueIndexes($table)).
                static::generatePrimaryKey($table->primaryKey, $table->columns).
                static::generateTableOptions();
        }
        foreach ($this->db->schema->getTableSchemas() as $table) {
            $stdout .= $this->generateForeignKey($table);
        }
        $this->stdout($stdout);
    }
public function actionCreate()
    {
        $stdout = '';
        foreach ($this->db->schema->getTableSchemas() as $table) {
            if ($table->name === $this->migrationTable) {
                continue;
            }
            $stdout .= static::generateCreateTable($table->name).
                static::generateColumns($table->columns, $this->db->schema->findUniqueIndexes($table)).
                static::generatePrimaryKey($table->primaryKey, $table->columns).
                static::generateTableOptions();
        }
        foreach ($this->db->schema->getTableSchemas() as $table) {
            $stdout .= $this->generateForeignKey($table);
        }
        $this->stdout($stdout);
    }
public function actionCreate ( ) { $ stdout = '' ; foreach ( $ this -> db -> schema -> getTableSchemas ( ) as $ table ) { if ( $ table -> name === $ this -> migrationTable ) { continue ; } $ stdout .= static :: generateCreateTable ( $ table -> name ) . static :: generateColumns ( $ table -> columns , $ this -> db -> schema -> findUniqueIndexes ( $ table ) ) . static :: generatePrimaryKey ( $ table -> primaryKey , $ table -> columns ) . static :: generateTableOptions ( ) ; } foreach ( $ this -> db -> schema -> getTableSchemas ( ) as $ table ) { $ stdout .= $ this -> generateForeignKey ( $ table ) ; } $ this -> stdout ( $ stdout ) ; }
Generates the 'createTable' code.
@return integer the status of the action execution
Generates the createTable code .