64 Commits

Author SHA1 Message Date
37bd0229ad fixed migration example in guide
do not register the `app\migrations` path twice when using namespaces.

fixes #14536
2017-07-28 12:35:44 +02:00
6ec6f8d76c moved include file logic to separate method 2017-06-02 13:35:45 +02:00
5288577221 make migrationPath accept an array 2017-06-02 13:35:45 +02:00
cb9462b224 Added support for specifying aliases for migrationNamespaces
This is used to specify pathes to migrations that do not have
namespaces.

While not directly supported by the migration command provideded by the
framework, these migrations exist in a lot of extensions because custom implementations
of migration controllers out of the framework were using this approach
to load multiple migrations from multiple paths.

Even the framework itself currently ships non-namespaced migrations:

- 17a1d91e4a/framework/rbac/migrations/m140506_102106_rbac_init.php
- 17a1d91e4a/framework/caching/migrations/m150909_153426_cache_init.php
- 17a1d91e4a/framework/log/migrations/m141106_185632_log_init.php

This change allows existing applications to adopt the new namespace-based approach
while keeping existing migrations. While it would be possible to add
namespaces to migrations in the application itself, it is not easily possible
to add namespaces to migrations that come from external sources like
extensions.
2017-06-02 13:34:34 +02:00
618f61fafe Update db-migrations.md (#14113) [skip ci]
I made a typo. Sorry. The command migration-rbac, migrationPath property already exists.
2017-05-04 22:23:39 +03:00
6a28353a97 Update db-migrations.md (#14109) [skip ci]
By default, the class BaseMigrateController property migrationPath is assigned the value '@app/migrations'. In the method getNewMigrations() is the conversion migrationNamescpaces in the path to the file and merges it all into a single array along with the path migrationPath. If the project for migration module is a separate table in the database, all migration came from migrationPath are not initialized and therefore try to migrate. Therefore, it is necessary to specify the property 'migrationPath' => null.
2017-05-04 16:03:15 +02:00
2e32e97c02 fix anchor
http://www.yiiframework.com/doc-2.0/guide-db-migrations.html#creating-migrations
2017-02-16 23:30:45 +03:00
72a690216a Fixes #13466: Added info about generating migration which adds multiple columns at once [skip ci] 2017-02-01 01:17:27 +03:00
25a7ed60e7 Docs about namespaced migrations fixed 2017-01-10 14:22:50 +02:00
11f8078ec4 docs/guide/db-migrations.md readability improved [skip ci] 2017-01-07 10:43:27 +09:00
7be8ccbb41 All words in h3 in docs must start with capital letter (#13207) 2016-12-14 12:44:15 +01:00
a1581329cf Fixes #13183: Docs for working with separated migrations (#13201) 2016-12-14 13:19:43 +03:00
4f89265fff Fixes #12748: Migration generator now tries to fetch reference column name for foreignKey from schema if it's not set explicitly 2016-11-01 02:02:16 +03:00
fda4fccbb9 fix pull !11207 does not update db migrations guide 2016-09-23 12:09:14 +08:00
685f16e8ef 📖 Updated guide pages - wrap true, false, null 2016-09-20 10:49:15 +03:00
07642098c0 Update db-migrations.md [skip ci] (#11886) 2016-07-04 13:11:34 +03:00
5992eea571 Fixes #11808: _table and _column suffixes are now required when generating migration 2016-07-04 12:50:37 +03:00
b9bff5f681 Correct links for migration database accessing methods. (#11669) [skip ci] 2016-06-06 20:49:28 +02:00
48bcee6fc3 Doc translation es (#11597)
* Added glossary to Spanish translation

* Some spanish translation updates

* DB Migrations Spanish Docs [skip ci]

* Fix line break in english doc [skip ci]
2016-05-19 23:44:45 +03:00
f288747e95 Fixes #6904: Added reference to webshell extension from mirations guide 2016-04-30 21:49:54 +03:00
a9d18f581f Added new comment methods to mirgrations docs 2016-04-28 14:22:03 +03:00
928d095c1b [docs] [skip ci] the name method default() is incorrect (#11361) 2016-04-16 12:55:27 +03:00
49aec24ae1 Enh: Migrate command now supports foreign keys
Fixes #11207: migrate command can create foreign keys
2016-04-05 01:02:52 +03:00
0d0e88bd2e Fix method [skip ci] 2016-03-26 02:52:02 +01:00
7639aee21e fix dcos [skip ci] 2016-02-22 03:02:34 +01:00
dc13fd8cfe fix docs [skip ci] 2016-02-19 21:37:02 +01:00
997dfa3e11 review guide and UPGRADE file 2016-02-12 15:56:54 +01:00
93e2803c49 Fixed typo in docs [skip ci] 2016-01-29 12:01:40 +06:00
2a1764f97a Enhancements for #9465 2015-11-23 13:33:26 +03:00
6c2702eec2 Fix name migration class [skip ci] 2015-11-21 12:00:11 +01:00
f03808a7c8 Additional fixes for #9465 2015-11-20 23:04:29 +03:00
76e8556d34 #9465 better naming, code polish, changelog, docs wording 2015-11-20 22:50:32 +03:00
9afd240ab6 Fixes #9465: ./yii migrate/create now generates code based on migration name and --fields 2015-11-20 22:08:47 +03:00
a50f444559 Updated link to current statements of mysql 2015-11-20 10:47:10 +03:00
578772d3cd fixed a sentence [ci skip] 2015-09-03 07:15:15 +09:00
3915df20b8 docs/guide/db-migrations.md small fixes [ci skip] 2015-09-02 23:48:37 +09:00
9c930e34c0 Fix code style and delete declaration of yii\db\Schema [skip ci] 2015-08-26 00:07:21 +02:00
f4a5b03b1d updated docs about AR in migrations
fixes #9374
2015-08-11 21:49:58 +02:00
1f17ca10dc Fixing a typo 2015-08-06 18:12:01 +03:00
30724af4e8 Update schema builder doc 2015-08-04 13:42:18 +02:00
cba167bcde adjusted version info in the guide 2015-08-04 12:21:22 +02:00
dd1471f6b3 adjusted guide docs for SchemaBuilder 2015-08-04 00:04:26 +02:00
3c9e6be413 Added schema builder usage to migations guide 2015-07-10 00:21:20 +03:00
197f81a4b2 Merge pull request #8168 from janfrs/master
docs/guide-pt-BR/db-migrations.md - add [skip ci]
2015-04-24 12:40:59 +03:00
52c707d151 Fixed some tipos on guide-br db-migrations.md and some link references on guide db-migrations.md 2015-04-24 00:48:11 -03:00
b7156d3041 Added note about the fact that migrations aren't about DB schema only 2015-04-23 12:51:35 +03:00
72fbe65234 finished migration guide [skip ci] 2015-03-19 15:31:34 -04:00
b77726ed3d migration guide WIP [skip ci] 2015-03-18 22:29:23 -04:00
5f32d3af15 migration guide WIP [skip ci] 2015-03-17 22:10:09 -04:00
7497d80909 Update db-migrations.md 2014-11-23 20:02:13 -03:00