Yii2 migrate to Oracle?

Strange behavior in migrations that have changed the connection from Posgresql to Oracle.
See:

class m190325_054540_add_table_news extends Migration {

 public function safeUp() {
 $this->createTable('news', [
 'id' => Schema::TYPE_PK,
 'old_id' => Schema::TYPE_INTEGER . 'NOT NULL',
 'category_id' => Schema::TYPE_SMALLINT . 'NOT NULL',
 'date' => Schema::TYPE_DATETIME . 'NOT NULL',
 'title' => Schema::TYPE_STRING . 'NOT NULL',
 'text' => Schema::TYPE_TEXT . 'NOT NULL',
 'is_published' => Schema::TYPE_BOOLEAN . 'NOT NULL DEFAULT false',
 'is_hot' => Schema::TYPE_BOOLEAN . 'NOT NULL DEFAULT false',
 'image' => Schema::TYPE_STRING,
 'lang' => Schema::TYPE_STRING,
 'insert_stamp' => Schema::TYPE_DATETIME . 'NOT NULL',
 'update_stamp' => Schema::TYPE_DATETIME . 'NOT NULL',
]);


 $this->createIndex('ix-old-id', 'news', 'old_id', true);
 $this->createIndex('ix-cat-dt-pub-l', 'news', ['category_id', 'date', 'is_published', 'lang']);
}

/**
 * {@inheritdoc}
*/
 public function safeDown() {
$this->dropTable('news');
}
}


regular the simplest migration, in Postgres is no problem. Oracle also swears here so: Exception: ORA-00907: missing right parenthesis.

What his right parenthesis necessary? For what? The table is still created, but the entry on applied migration does not appear in the sign where it should be.
March 19th 20 at 08:56
1 answer
March 19th 20 at 08:58
Solution
all bullshit... the migration table Yii does, and the second time when you run yii migrate -- she sees and tries to re-create:

'ORA-00955: name is already used by an existing object
The SQL being executed was: CREATE TABLE "migration" (
 "version" varchar(180) NOT NULL PRIMARY KEY,
 "apply_time" NUMBER(10,0)
)'


Oracle zasto???(((

And the most fun that Oracle is 12, and I still have a connect in the 11th. So change on him and there, too, everything is fine. Lol KEK pasties.

upd...

migration the vanquished. merry Oracle gives me a lot of pleasure:

DEFAULT ON NULL 0
table Yii migration does, and the second time when you run yii migrate -- she sees and tries to re-create

Baska Yii, why it uses the shielding of the names the quotes, and they are created with preserve case. Normal people make quotation marks around keywords if suddenly in another way. Without quotes, Oracle generates the names in upper case. - kaia_Tremblay commented on March 19th 20 at 09:01

Find more questions by tags Database migrationYiiOracle