Search code examples
loopbackjs

Migration from Loopback 3 to Loopback 4


is there any automated way to migrate project in Loopback 3 to Loopback 4? For example, I have model definition in JSON:

{"name": "Item",
  "base": "PersistedModel",
  "forceId": true,
  "properties": {
    "id": {
      "type": "number",
      "id": true
    },
    "created": {
      "type": "Date",
      "postgresql": {
        "dbDefault": "now()"
      }
    },
    "name": {
      "type": "string",
      "required": true
    }
  }
}

Is there a way to auto-create the same model in LB4?


Solution

  • Update 13 May 2020

    The LoopBack 4 documentation now has a comprehensive migration guide. CLI tooling are also available to help migrate certain compon

    Original answer

    Hello from the LoopBack team 👋

    There is no clear migration path from LoopBack 3 to LoopBack 4 yet. We are discussing different approaches to migration in the GitHub issue loopback-next#1849, you may find some of the information useful. We encourage all LB3 users to join the discussion.

    Note that LB4 does not support all LB3 features yet, the list of missing features is maintained in the GitHub issue loopback-next#1920.