| 31 | | Original schema name | Custom schema name |
|---|
| 32 | | -----------------------------------------|------------------------ |
|---|
| 33 | | config/schema.yml | schema.custom.yml |
|---|
| 34 | | config/foobar_schema.yml | foobar_schema.custom.yml |
|---|
| 35 | | plugins/myPlugin/config/schema.yml | myPlugin_schema.custom.yml |
|---|
| 36 | | plugins/myPlugin/config/foo_schema.yml | myPlugin_foo_schema.custom.yml |
|---|
| | 31 | || '''Original schema name''' || '''Custom schema name''' || |
|---|
| | 32 | || config/schema.yml || schema.custom.yml || |
|---|
| | 33 | || config/foobar_schema.yml || foobar_schema.custom.yml || |
|---|
| | 34 | || plugins/myPlugin/config/schema.yml || myPlugin_schema.custom.yml || |
|---|
| | 35 | || plugins/myPlugin/config/foo_schema.yml || myPlugin_foo_schema.custom.yml || |
|---|
| | 40 | |
|---|
| | 41 | {{{ |
|---|
| | 42 | # Original schema |
|---|
| | 43 | ################# |
|---|
| | 44 | propel: |
|---|
| | 45 | article: |
|---|
| | 46 | _attributes: { phpName: Article } |
|---|
| | 47 | title: varchar(50) |
|---|
| | 48 | user_id: { type: integer } |
|---|
| | 49 | created_at: |
|---|
| | 50 | |
|---|
| | 51 | # Custom schema |
|---|
| | 52 | ############### |
|---|
| | 53 | propel: |
|---|
| | 54 | article: |
|---|
| | 55 | _attributes: { phpName: Article, package: foo.bar.lib.model } |
|---|
| | 56 | stripped_title: varchar(50) |
|---|
| | 57 | |
|---|
| | 58 | # Resulting schema |
|---|
| | 59 | ################## |
|---|
| | 60 | propel: |
|---|
| | 61 | article: |
|---|
| | 62 | _attributes: { phpName: Article, package: foo.bar.lib.model } |
|---|
| | 63 | title: varchar(50) |
|---|
| | 64 | user_id: { type: integer } |
|---|
| | 65 | created_at: |
|---|
| | 66 | stripped_title: varchar(50) |
|---|
| | 67 | }}} |
|---|
| | 68 | |
|---|
| | 69 | When merging two tables, the plugin will consider the table's `phpName` as a key, and therefore you can change the name of a table in the database, provided that you keep the same `phpName` in the schema. Here is a more complex example: |
|---|