# Migration guide from 0.x.x to 1.0.0

## Migration

### 1. Update configuration file name

First, update configuration file name from `.readymage.yaml` → `readymage.yaml`

### 2. Update property names

Convert [camelCase](https://en.wikipedia.org/wiki/Camel_case) property names to [snake\_case](https://en.wikipedia.org/wiki/Camel_case).

For example:

* `schemaVersion` → `schema_version`
* `preBuild` → `pre_build`
* `postBuild` → `post_build`

### 3. Update hooks

Contents of `hooks` have been moved from array type to regular key-values

```yaml
hooks:
- preBuild: ...
- postBuild: ...
```

→

```yaml
hooks:
  pre_build: ...
  post_build: ...
```

### 3. Update actions

#### Copy

```yaml
...
- copy:
    name: Copy config
    source: app/etc/config-ca.php
    destination: app/etc/config.php
...
```

→

```yaml
...
- copy:
    app/etc/config-ca.php: app/etc/config.php
...
```

#### Move

```yaml
...
- move:
    name: Move config
    source: app/etc/config-ca.php
    destination: app/etc/config.php
...
```

→

```yaml
...
- move:
    app/etc/config-ca.php: app/etc/config.php
...
```

#### Symlink

```yaml
...
- symlink:
    name: Symlink to target inisde persistent directory
    path: satis/satis.json
    target: satis.json
    persistentTarget: true

- symlink:
    name: Symlink to target inside magento root directory
    path: package2.json
    target: scandipwa/package.json
...
```

→

```yaml
...
- symlink:
    satis/satis.json: persistent:satis.json
    package2.json: scandipwa/package.json
...
```

### Example migration

```yaml
schemaVersion: 0.4.0
environments:
- name: readymage-testinging-env-a
  build:
    hooks:
    - preBuild:
      - copy:
          name: Copy magento php config
          source: app/etc/config-ca.php
          destination: app/etc/config.php
- name: readymage-testinging-env-b
  build:
    hooks:
    - preBuild:
      - copy:
          name: Copy magento php config
          source: app/etc/config-aus.php
          destination: app/etc/config.php
      - copy:
          name: Copy package.json
          source: scandipwa/package-aus.json
          destination: scandipwa/package.json
      - copy:
          name: Copy package-lock.json
          source: scandipwa/package-lock-aus.json
          destination: scandipwa/package-lock.json
```

→

```yaml
schema_version: 1.0.0
environments:
- name: readymage-testinging-env-a
  build:
    hooks:
      pre_build:
      - copy:
	  app/etc/config-ca.php: app/etc/config.php
- name: readymage-testinging-env-b
  build:
    hooks:
      pre_build:
      - copy:
          app/etc/config-aus.php: app/etc/config.php
	  scandipwa/package-aus.json: scandipwa/package.json
          scandipwa/package-lock-aus.json: scandipwa/package-lock.json
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.readymage.com/application-management/deploy-changes-to-your-instance/pipeline-configuration-file/migration-guide-from-0.x.x-to-1.0.0.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
