per page, with , order by , clip by
Results of 1 - 10 of about 14 for RunSQL (0.008 sec.)
マイグレーション・オペレーション 14476
マイグレーション・オペレーション マイグレーションファイルは一つ以上の オペレーション 、データベースに対してマイグレーションが行うべきオペレーションを宣言的に保持するオブジェクト、から構成されます。 Django はこれらの Operation オブジェクトも ... えることなく、 model_name で指定したモデルの name という名前の制約を新たな constraint に置き換えます。 特別なオペレーション RunSQL class RunSQL ( sql , reverse_sql = None , state_operations = None , hints = None , elidable = False ) [ソース] データベース ... メータを cursor.execute() において行うのと同じ形式で渡すために用いられます。以下の 3 つの処理は互いに等価です: migrations . RunSQL ( "INSERT INTO musician (name) VALUES ('Reinhardt');" ) migrations . RunSQL ([( "INSERT INTO musician (name) VALUES ('Rein ... hardt');" , None )]) migrations . RunSQL ([( "INSERT INTO musician (name) VALUES ( %s );" , [ "Reinhardt" ])]) クエリにパーセント文字リテラルを含ませたい場合、パラ ...
https://man.mtool.work/django/6.1/ref/migration-operations.html
データベースのマイグレーションの作成方法 9680
データベースのマイグレーションの作成方法 このドキュメントでは、遭遇する可能性のあるいくつかのシナリオに対する、データベースのマイグレーションの構成方法と書き方について説明します。マイグレーションに関する入門的な資料を探しているなら、 トピッ ... migrations ] operations = [ migrations . RunPython ( forwards , hints = { "target_db" : "default" }), ] もし RunPython や RunSQL 操作が 1 つのモデルにしか影響しないのであれば、 model_name をヒントとして渡すことで、ルーターに対して最大限、透過的になりま ... し、すべての行に一意な値を設定するまで、一意制約の作成を延期します。 最初の空のマイグレーションファイルに、 RunPython または RunSQL オペレーションを追加して、既存の各行に対して一意な値 (この例では UUID) を生成します。 uuid のインポートも追加します。例: 0 ... erations = [ # Old table name from checking with sqlmigrate, new table # name from AuthorBook._meta.db_table. migrations . RunSQL ( sql = "ALTER TABLE core_book_authors RENAME TO core_authorbook" , reverse_sql = "ALTER TABLE core_authorbook RENAME TO c ...
https://man.mtool.work/django/6.1/howto/writing-migrations.html
Django 1.8 リリースノート 9680
Django 1.8 リリースノート April 1, 2015 Django 1.8 へようこそ! このリリースノートでは、 バージョン 1.8 の新機能 と、Django 1.7 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した機能 ... ed to the django.request logger when a middleware raises a MiddlewareNotUsed exception in DEBUG mode. マイグレーション The RunSQL operation can now handle parameters passed to the SQL statements. It is now possible to have migrations (most probably dat ... part of the model state. A generic mechanism to handle the deprecation of model fields was added. The RunPython.noop() and RunSQL.noop class method/attribute were added to ease in making RunPython and RunSQL operations reversible. The migration operati ... ons RunPython and RunSQL now call the allow_migrate() method of database routers. The router can use the newly introduced app_label and hints argum ...
https://man.mtool.work/django/6.1/releases/1.8.html
FAQ: データベースとモデル 8805
FAQ: データベースとモデル Django が実行している生の SQL クエリを見られますか? Django の設定ファイルの DEBUG が True になっていることを確認します。次に、以下のコードを実行してください。 >>> from django.db import connection >>> connection . q ... ケースを追加するのを避けようとします。データベース固有のオプションを使いたければ、あなたが指定したい ALTER TABLE 文を含めた RunSQL を使ったマイグレーションを作成してください。 たとえば、 MySQL を使っていて、 MyISAM ストレージエンジンを使いたい場合、以下 ...
https://man.mtool.work/django/6.1/faq/models.html
Django 1.7.1 リリースノート 8805
Django 1.7.1 リリースノート October 22, 2014 Django 1.7.1 fixes several bugs in 1.7. バグ修正 Allowed related many-to-many fields to be referenced in the admin ( #23604 ). Added a more helpful error message if you try to migrate an app with ... ). Added the get_extra() , get_max_num() , and get_min_num() hooks to GenericInlineModelAdmin ( #23539 ). Made migrations.RunSQL no longer require percent sign escaping. This is now consistent with cursor.execute() ( #23426 ). TEST 辞書の SERIALIZE 項 ...
https://man.mtool.work/django/6.1/releases/1.7.1.html
Django 1.7.2 リリースノート 8594
Django 1.7.2 リリースノート January 2, 2015 Django 1.7.2 fixes several bugs in 1.7.1. Additionally, Django's vendored version of six, django.utils.six , has been upgraded to the latest release (1.9.0). バグ修正 Fixed migration's renaming of ... for cyclic dependencies much more helpful. Added missing index_together handling for SQLite ( #23880 ). Fixed a crash when RunSQL SQL content was collected by the schema editor, typically when using sqlmigrate ( #23909 ). Fixed a regression in contrib. ...
https://man.mtool.work/django/6.1/releases/1.7.2.html
マイグレーション 8594
マイグレーション マイグレーション (Migrations) は、Django でモデルに対して行った変更 (フィールドの追加やモデルの削除など) をデータベーススキーマに反映させる方法です。大抵のマイグレーションは自動で行われるものの、いつマイグレーションが作られ ... pplying books.0003_auto...Traceback (most recent call last): django.db.migrations.exceptions.IrreversibleError: Operation <RunSQL sql='DROP TABLE demo_books'> in books.0003_auto is not reversible ...\> py manage.py migrate books 0002 Operations to perf ... pplying books.0003_auto...Traceback (most recent call last): django.db.migrations.exceptions.IrreversibleError: Operation <RunSQL sql='DROP TABLE demo_books'> in books.0003_auto is not reversible 履歴上のモデル マイグレーションを実行するとき、 Django は ... らしたら (どれだけ減らせるかは、モデルがどれだけ密接に絡み合っているか、また elidable とマークされていない限り最適化できない RunSQL や RunPython 操作があるかどうかによって決まります)、Django はそれを新しいマイグレーションファイル群に書き戻します。 These ...
https://man.mtool.work/django/6.1/topics/migrations.html
Django 1.7 リリースノート 8157
Django 1.7 リリースノート September 2, 2014 Django 1.7 へようこそ! このリリースノートでは、 バージョン 1.7 の新機能 と、Django 1.6 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した ... you want to load initial data for an app, we suggest you create a migration for your application and define a RunPython or RunSQL operation in the operations section of the migration. Test rollback behavior is different for apps with migrations; in par ... がインストールされている場合、初期 SQL データがより良く動作するようになりました。 Note that it's deprecated in favor of the RunSQL operation of migrations, which benefits from the improved behavior. モデル The QuerySet.update_or_create() method was adde ...
https://man.mtool.work/django/6.1/releases/1.7.html
データベース 7719
データベース Django は次のデータベースを公式にサポートしています。 PostgreSQL MariaDB MySQL Oracle SQLite サードパーティから提供されているデータベースバックエンド も多数あります。 Django はすべてのデータベースで可能な限り多くの機能をサポート ... る必要があります: ALTER TABLE ` your_table ` MODIFY ` your_datetime_column ` DATETIME ( 6 ) または データマイグレーション の RunSQL オペレーションを使用します。 TIMESTAMP カラム もし TIMESTAMP カラムを含むレガシーデータベースを使用している場合、データの破 ...
https://man.mtool.work/django/6.1/ref/databases.html
Django 1.10 リリースノート 7719
Django 1.10 リリースノート 2016年8月1日 Django 1.10 へようこそ! このリリースノートでは、 バージョン 1.10 の新機能 と、Django 1.9 以前からアップグレードする際に注意が必要な 後方互換性が失われた変更点 について説明します。私たちは、非推奨の期間 ... es as arguments. マイグレーション Added support for serialization of enum.Enum objects. Added the elidable argument to the RunSQL and RunPython operations to allow them to be removed when squashing migrations. Added support for non-atomic migrations by ...
https://man.mtool.work/django/6.1/releases/1.10.html
PREV 1 2 NEXT