https://2021.pycon.jp/time-table/?id=273396
Webアプリ開発とデータベースマイグレーションには密接な関係があり、Pythonでよく採用されるDjangoやSQLAlchemyには、DBのスキーマを変更するマイグレーション機能があります。一般的に、プログラムを実装するときはリポジトリでブランチを作りそれぞれのブランチで実装作業を進めます。Webアプリの開発でも同様ですが、各ブランチでDBスキーマを変更する場合には注意が必要です。例えば、複数のブランチで同じテーブルのカラムを追加して使いたい場合や、DBスキーマの変更が競合する場合は、ブランチのマージ時に競合してしまいます。多くの機能を並行開発したり、マージするまでの期間が長い場合には、このような競合が増えてしまいます。
このトークでは、Djangoを例に、データベースマイグレーションの仕組みから、実際の開発現場で発生したトラブルとその解決方法について紹介します。
Migration strategies for parallel development of web applications
The document describes a hackathon project called "Company Scouter" that calculates the overall "power level" of a company based on the aggregated Klout scores of its members. The iOS app allows users to input a company name and see the resulting power level calculated from data retrieved via APIs from Crunchbase and Klout. It also notes that four open source repositories were created during the hackathon to support the app.
Managed Object Contexts cannot be shared across threads and objects cannot be passed between threads. Core Data supports concurrency through contexts with different queue types (main vs private queue). Child contexts allow sharing objects and changes with a parent context on a different thread or for temporarily storing changes. Core Data supports migrations to handle changes to the data model over time through lightweight and custom migrations.