| 1 | <?php |
| 2 | |
| 3 | namespace Wikimedia\Rdbms; |
| 4 | |
| 5 | /** |
| 6 | * Interface SchemaChangeBuilder that gets a definition and produces ALTER TABLE SQL based on RDBMS |
| 7 | * |
| 8 | * @experimental |
| 9 | * @unstable |
| 10 | */ |
| 11 | interface SchemaChangeBuilder { |
| 12 | |
| 13 | /** |
| 14 | * An example of $schema value: |
| 15 | * [ |
| 16 | * 'comment' => 'Adding foo field', |
| 17 | * 'before' => <Before snapshot of the abstract schema> |
| 18 | * 'after' => <After snapshot of the abstract schema> |
| 19 | * ], |
| 20 | * @param array $schemaChangeSpec |
| 21 | * @return string[] |
| 22 | */ |
| 23 | public function getSchemaChangeSql( array $schemaChangeSpec ): array; |
| 24 | } |