Carsten Brandt
6ec6f8d76c
moved include file logic to separate method
7 years ago
Carsten Brandt
5288577221
make migrationPath accept an array
7 years ago
SG5
1141fc81a7
Fixes #12735 : Fixed `yii\console\controllers\MigrateController` creating multiple primary keys for field `bigPrimaryKey:unsigned`
8 years ago
Klimov Paul
1157657cab
Fixed incorrect order of migrations history in case `yii\console\controllers\MigrateController::$migrationNamespaces` is in use
8 years ago
evgen
5c3cdd792b
fix code style
8 years ago
evgen
3d3d69e3a8
returned back `orderBy()`
8 years ago
evgen
50062d0b9f
some change
8 years ago
evgen
c7c8f09827
ksort and reverse to uksort
8 years ago
evgen
481932e238
add migration name to sort
8 years ago
Evgeny
59f7335b8f
change getMigrationHistory
8 years ago
Alexander Zlakomanov
b48b1a0657
Fixes #12904 : Fixed lowercase table name in migrations
8 years ago
Robert Korulczyk
4aa935e69e
Fixes #12055 : Changed `boolean` to `bool` and `integer` to `int` in phpdoc
8 years ago
MKiselev
4f89265fff
Fixes #12748 : Migration generator now tries to fetch reference column name for foreignKey from schema if it's not set explicitly
8 years ago
Paul Klimov
8aa0e85a07
Add migration namespace support ( #12511 )
...
namespace support added to `BaseMigrateController`
8 years ago
Daniel Gomez Pan
ae42d7b281
Fix #12423 Fix bug migration tool when creating fields with brackets in comment
8 years ago
Alexander Makarov
496de65ee2
Fixes #12053 : `./yii migrate/create` was generating wrong code when using `bigPrimaryKey`
8 years ago
Robert Korulczyk
5992eea571
Fixes #11808 : `_table` and `_column` suffixes are now required when generating migration
8 years ago
cuiliang
c0df003ac0
merge from master
8 years ago
Nikola Kovacs
9d327baa8b
coding style fixes
8 years ago
Carsten Brandt
731769241b
release version 2.0.8
9 years ago
Carsten Brandt
4411a74ebd
proper fix for #9425 , adjust changes from #11363
...
includes tests and fix that works in all cases.
9 years ago
Carsten Brandt
9ea5d46140
added missing `@since` annotations
9 years ago
Evgeniy Tkachenko
7c663debd5
[ci skip] phpDoc updated ( #11434 )
9 years ago
Klimov Paul
de3c7d9d27
Fix `MigrateController`
9 years ago
Paul Klimov
e2cdaa40a2
`MigrateController` refactored avoiding internal state changing
9 years ago
Angel Guevara
b923adf75c
Enh: Support for useTablePrefix parameter in migrate command
...
Fixes #11166 : migrate command new option `useTablePrefix`
9 years ago
Klimov Paul
a90ffecdb3
`MigrateController` refactored avoiding internal state changing
9 years ago
Paul Klimov
b72524d490
Fixes #11280 migrate autogenerate breaks MongoDB migration
...
Fixes #11280 : Descendants of `yii\console\controllers\BaseMigrateController`, like the one for MongoDB, unable to create new migration
9 years ago
Angel Guevara
49aec24ae1
Enh: Migrate command now supports foreign keys
...
Fixes #11207 : migrate command can create foreign keys
9 years ago
Daniel Gomez Pan
705edfff5a
Add aliases for core commands
9 years ago
Carsten Brandt
5db772ef7b
cleanup console namespace changes
9 years ago
SilverFire - Dmitry Naumenko
cd87d67f34
Global DOCS update: ~~~ replaced with ```
9 years ago
Daniel Gomez Pan
2a1764f97a
Enhancements for #9465
9 years ago
Alexander Makarov
76e8556d34
#9465 better naming, code polish, changelog, docs wording
9 years ago
Daniel Gomez Pan
9afd240ab6
Fixes #9465 : ./yii migrate/create now generates code based on migration name and --fields
9 years ago
Alexander Makarov
a6b8a30998
Removed unused "use"
9 years ago
Carsten Brandt
681db52ba6
refactored SchemaBuilder
...
- rename class to ColumnSchemaBuilder as this is more appropriate
- changed internal organisation to match how the rest of schema related classes work
- the ColumnSchemaBuilder is now created the same way as QueryBuilder is
- removed static call magic and method annotations, now real methods are called as they are
- the whole code works on objects in a db context now instead of setting database connection in global state
- trait is now used by Migration by default but can be used in other contexts as well
Migration usage is now as follows:
```php
$this->createTable('example_table', [
'id' => $this->primaryKey(),
'name' => $this->string(64)->notNull(),
'type' => $this->integer()->notNull()->defaultValue(10),
'description' => $this->text(),
'rule_name' => $this->string(64),
'data' => $this->text(),
'created_at' => $this->datetime()->notNull(),
'updated_at' => $this->datetime(),
]);
```
9 years ago
╃巡洋艦㊣
586684b050
2.0.5 bf7edc5
9 years ago
Matvey Vasenin
da941a7675
Improved `SchemaBuilder` implementation
9 years ago
Sergey Gonimar
3872c6c565
Fix migrate/down order
...
Migrations were applied at the same time. This cause invalid sort order while downgrade.
Command `yii migrate `
Output:
```
Yii Migration Tool (based on Yii v2.0.4-dev)
Total 2 new migrations to be applied:
m150402_075534_initial
m150402_075544_feedback
```
Command `yii migrate/down 2`
```
Yii Migration Tool (based on Yii v2.0.4-dev)
Total 2 migrations to be reverted:
m150402_075534_initial
m150402_075544_feedback
```
In databasse
```
"m000000_000000_base";1428382302
"m150402_075534_initial";1428388855 <----
"m150402_075544_feedback";1428388855 <----
```
10 years ago
Alexander Makarov
1713a99c79
Fixes #7924 : Migrations in history are now ordered by time applied allowing to roll back in reverse order no matter how these were applied
10 years ago
Carsten Brandt
2b6de9665e
adjusted docs about #7347
10 years ago
lynicidn
84052d15df
Used yii\di\Instance::ensure() in MigrateController instead of doing the same without it
10 years ago
╃巡洋艦㊣
1468bd4d3d
version 2.0.1 84b42ab
10 years ago
Alexander Makarov
9e42285f61
Reverted #3305
10 years ago
Carsten Brandt
8b79293ff2
added missing `@since` annotations
10 years ago
Alexander Makarov
5d7b70da5f
Adjusted #3305 : `MigrateController::refreshSchema()` is no more called automatically
10 years ago
Alexander Makarov
7c5938f902
#4791 : Added more colors to `yii migrate` command
10 years ago
Alexander Makarov
3c70d3c317
Fixes #3305 : `yii migrate` now automatically flushes DB schema cache after successful migration
10 years ago
Alexander Makarov
00ca1cb4b3
Fixes #4914
10 years ago