Giter VIP home page Giter VIP logo

Comments (5)

Moriya-Taichi avatar Moriya-Taichi commented on July 30, 2024
  • Lightweight Migration
    下記の操作に対応。自動的にmigrationが行われる

    • Addition of an attribut
    • Removal of an attribute
    • A nonoptional attribute becoming optional
    • An optional attribute becoming non-optional, and defining a default value
    • Renaming an entity or property
  • Heavyweight Migration

Use heavyweight (manual) migration in rare cases when changes to the data model exceed the capabilities of lightweight migration

公式の説明がこれしかない
Light以外の操作で使われる
RealmGRDBと同じでマニュアルでmigrationする。
日本語でやり方を書いている記事はなさそう。

from ormcomparison-ios.

Moriya-Taichi avatar Moriya-Taichi commented on July 30, 2024

https://medium.com/@shakya4577/heavyweight-core-data-migration-51570555124b

この記事だとNSEntityMigrationPolicyのサブクラスを作って
マッピングを書けばできるらしい。
起動時などにmigration()的な形で明示的に呼んでいる訳ではないので
自動的に呼ばれる?

from ormcomparison-ios.

Moriya-Taichi avatar Moriya-Taichi commented on July 30, 2024

英語の文献でも少ない
https://www.objc.io/issues/4-core-data/core-data-migration/
obj-cだけど書いてた

from ormcomparison-ios.

Moriya-Taichi avatar Moriya-Taichi commented on July 30, 2024

https://williamboles.me/step-by-step-core-data-migration/
ここによると*.xcmappingmodel or NSEntityMigrationPolicyでマイグレーションを書いたら勝手にやってくれるらしい
マッピングモデルを探して、見つからない時はLightWeightを実行するとのこと

from ormcomparison-ios.

Moriya-Taichi avatar Moriya-Taichi commented on July 30, 2024

とりあえずはNSEntityMigrationPolicyを書こう!でよさげ

from ormcomparison-ios.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.