... on 操作の中で、 schema_editor.connection.alias 属性を見て、データベース接続のエイリアスを確認します: from django.db import migrations def forwards ( apps , schema_editor ): if schema_editor . connection . alias != "default" : return # Your migration code ... goes here class Migration ( migrations . Migration ): dependencies = [ # Dependencies to other migrations ] operations = [ migrations . RunPython ( ... turn db == hints [ "target_db" ] return True これをマイグレーションに利用するには、次のようにします: from django.db import migrations def forwards ( apps , schema_editor ): # Your migration code goes here ... class Migration ( migrations . Migration ): de ... ... on 操作の中で、 schema_editor.connection.alias 属性を見て、データベース接続のエイリアスを確認します: from django.db import migrations def forwards ( apps , schema_editor ): if schema_editor . connection . alias != "default" : return # Your migration code ... goes here class Migration ( migrations . Migration ): dependencies = [ # Dependencies to other migrations ] operations = [ migrations . RunPython ( ... turn db == hints [ "target_db" ] return True これをマイグレーションに利用するには、次のようにします: from django.db import migrations def forwards ( apps , schema_editor ): # Your migration code goes here ... class Migration ( migrations . Migration ): de ... ... .six , has been upgraded to the latest release (1.9.0). バグ修正 ¶ Fixed migration's renaming of auto-created many-to-many tables when changing Meta.db_table ( #23630 ). Fixed a migration crash when adding ... ( #23717 ). Added GeoDjango compatibility with mysqlclient database driver. Fixed MySQL 5.6+ crash with GeometryField s in migrations ( #23719 ). Fixed a migration crash when removing a field that is referenced in AlterIndexTogether or AlterUniqueTogether ... n locale to Monday. Added support for transactional spatial metadata initialization on SpatiaLite 4.1+ ( #23152 ). Fixed a migration crash that prevented changing a nullable field with a default to non-nullable with the same default ( #23738 ). Fixed a mi ... ... .six , has been upgraded to the latest release (1.9.0). バグ修正 ¶ Fixed migration's renaming of auto-created many-to-many tables when changing Meta.db_table ( #23630 ). Fixed a migration crash when adding ... ( #23717 ). Added GeoDjango compatibility with mysqlclient database driver. Fixed MySQL 5.6+ crash with GeometryField s in migrations ( #23719 ). Fixed a migration crash when removing a field that is referenced in AlterIndexTogether or AlterUniqueTogether ... n locale to Monday. Added support for transactional spatial metadata initialization on SpatiaLite 4.1+ ( #23152 ). Fixed a migration crash that prevented changing a nullable field with a default to non-nullable with the same default ( #23738 ). Fixed a mi ... ... うコマンドを、いくつか挙げておきましょう。 migrate は、マイグレーションを適用したり、適用をキャンセルするのに使います。 makemigrations は、モデルに対して行った変更をもとに、新しいマイグレーションを作成します。 sqlmigrate は、マイグレーションに対応する SQL ... 文を表示します。 showmigrations は、プロジェクトのマイグレーションとそのステータスをリストします。 マイグレーションというのは、データベーススキーマに対す ... るバージョン管理システムのようなものです。 makemigrations はモデルの変更点を1つのマイグレーションファイルにパッケージングし(コミットのようなものです)、 migrate はその変更点をデータ ... ... うコマンドを、いくつか挙げておきましょう。 migrate は、マイグレーションを適用したり、適用をキャンセルするのに使います。 makemigrations は、モデルに対して行った変更をもとに、新しいマイグレーションを作成します。 sqlmigrate は、マイグレーションに対応する SQL ... 文を表示します。 showmigrations は、プロジェクトのマイグレーションとそのステータスをリストします。 マイグレーションというのは、データベーススキーマに対す ... るバージョン管理システムのようなものです。 makemigrations はモデルの変更点を1つのマイグレーションファイルにパッケージングし(コミットのようなものです)、 migrate はその変更点をデータ ... ... contenttypes 's or contrib.auth 's first migration ( #24075 ). Made the migration's RenameModel operation rename ManyToManyField tables ( #24135 ). Fixed a migration crash o ... リリースノート バグ修正 前のトピックへ Django 1.7.5 リリースノート 次のトピックへ Django 1.7.3 リリースノート 関連キーワード migration Fixed crash contrib ManyToManyField リリースノート January fixes several bugs バグ 修正 unapplying contenttypes auth first ... ... contenttypes 's or contrib.auth 's first migration ( #24075 ). Made the migration's RenameModel operation rename ManyToManyField tables ( #24135 ). Fixed a migration crash o ... リリースノート バグ修正 前のトピックへ Django 1.7.5 リリースノート 次のトピックへ Django 1.7.3 リリースノート 関連キーワード migration Fixed Django crash contrib ManyToManyField リリースノート January fixes several bugs バグ 修正 unapplying contenttypes aut ... ... 正 ¶ Added support for serializing timedelta objects in migrations ( #24566 ). Restored proper parsing of the testserver command's positional arguments (fixture names) ( #24571 ). Prevente ... anslation functions check_for_language() and get_language_bidi() when translations are deactivated ( #24569 ). Fixed squashmigrations command when using SeparateDatabaseAndState ( #24278 ). Stripped microseconds from datetime values when using an older ve ... rsion of the MySQLdb DB API driver as it does not support fractional seconds ( #24584 ). Fixed a migration crash when altering ManyToManyField s ( #24513 ). Fixed a crash with QuerySet.update() on foreign keys to one-to-one field ... ... 正 ¶ Added support for serializing timedelta objects in migrations ( #24566 ). Restored proper parsing of the testserver command's positional arguments (fixture names) ( #24571 ). Prevente ... anslation functions check_for_language() and get_language_bidi() when translations are deactivated ( #24569 ). Fixed squashmigrations command when using SeparateDatabaseAndState ( #24278 ). Stripped microseconds from datetime values when using an older ve ... rsion of the MySQLdb DB API driver as it does not support fractional seconds ( #24584 ). Fixed a migration crash when altering ManyToManyField s ( #24513 ). Fixed a crash with QuerySet.update() on foreign keys to one-to-one field ... 2026年10月08日