@@ -40,276 +40,276 @@ |
||
| 40 | 40 | */ |
| 41 | 41 | class Schema extends AbstractAsset |
| 42 | 42 | { |
| 43 | - /** @var Table[] */ |
|
| 44 | - protected $_tables = []; |
|
| 43 | + /** @var Table[] */ |
|
| 44 | + protected $_tables = []; |
|
| 45 | 45 | |
| 46 | - /** @var Sequence[] */ |
|
| 47 | - protected $_sequences = []; |
|
| 46 | + /** @var Sequence[] */ |
|
| 47 | + protected $_sequences = []; |
|
| 48 | 48 | |
| 49 | - /** @var SchemaConfig */ |
|
| 50 | - protected $_schemaConfig; |
|
| 49 | + /** @var SchemaConfig */ |
|
| 50 | + protected $_schemaConfig; |
|
| 51 | 51 | |
| 52 | - /** |
|
| 53 | - * @param Table[] $tables |
|
| 54 | - * @param Sequence[] $sequences |
|
| 55 | - * @param string[] $namespaces |
|
| 56 | - * |
|
| 57 | - * @throws SchemaException |
|
| 58 | - */ |
|
| 59 | - public function __construct(array $tables = [], array $sequences = [], ?SchemaConfig $schemaConfig = null, array $namespaces = []) |
|
| 60 | - { |
|
| 61 | - } |
|
| 52 | + /** |
|
| 53 | + * @param Table[] $tables |
|
| 54 | + * @param Sequence[] $sequences |
|
| 55 | + * @param string[] $namespaces |
|
| 56 | + * |
|
| 57 | + * @throws SchemaException |
|
| 58 | + */ |
|
| 59 | + public function __construct(array $tables = [], array $sequences = [], ?SchemaConfig $schemaConfig = null, array $namespaces = []) |
|
| 60 | + { |
|
| 61 | + } |
|
| 62 | 62 | |
| 63 | - /** |
|
| 64 | - * @deprecated |
|
| 65 | - * |
|
| 66 | - * @return bool |
|
| 67 | - */ |
|
| 68 | - public function hasExplicitForeignKeyIndexes() |
|
| 69 | - { |
|
| 70 | - } |
|
| 63 | + /** |
|
| 64 | + * @deprecated |
|
| 65 | + * |
|
| 66 | + * @return bool |
|
| 67 | + */ |
|
| 68 | + public function hasExplicitForeignKeyIndexes() |
|
| 69 | + { |
|
| 70 | + } |
|
| 71 | 71 | |
| 72 | - /** |
|
| 73 | - * @return void |
|
| 74 | - * |
|
| 75 | - * @throws SchemaException |
|
| 76 | - */ |
|
| 77 | - protected function _addTable(Table $table) |
|
| 78 | - { |
|
| 79 | - } |
|
| 72 | + /** |
|
| 73 | + * @return void |
|
| 74 | + * |
|
| 75 | + * @throws SchemaException |
|
| 76 | + */ |
|
| 77 | + protected function _addTable(Table $table) |
|
| 78 | + { |
|
| 79 | + } |
|
| 80 | 80 | |
| 81 | - /** |
|
| 82 | - * @return void |
|
| 83 | - * |
|
| 84 | - * @throws SchemaException |
|
| 85 | - */ |
|
| 86 | - protected function _addSequence(Sequence $sequence) |
|
| 87 | - { |
|
| 88 | - } |
|
| 81 | + /** |
|
| 82 | + * @return void |
|
| 83 | + * |
|
| 84 | + * @throws SchemaException |
|
| 85 | + */ |
|
| 86 | + protected function _addSequence(Sequence $sequence) |
|
| 87 | + { |
|
| 88 | + } |
|
| 89 | 89 | |
| 90 | - /** |
|
| 91 | - * Returns the namespaces of this schema. |
|
| 92 | - * |
|
| 93 | - * @return string[] A list of namespace names. |
|
| 94 | - */ |
|
| 95 | - public function getNamespaces() |
|
| 96 | - { |
|
| 97 | - } |
|
| 90 | + /** |
|
| 91 | + * Returns the namespaces of this schema. |
|
| 92 | + * |
|
| 93 | + * @return string[] A list of namespace names. |
|
| 94 | + */ |
|
| 95 | + public function getNamespaces() |
|
| 96 | + { |
|
| 97 | + } |
|
| 98 | 98 | |
| 99 | - /** |
|
| 100 | - * Gets all tables of this schema. |
|
| 101 | - * |
|
| 102 | - * @return Table[] |
|
| 103 | - */ |
|
| 104 | - public function getTables() |
|
| 105 | - { |
|
| 106 | - } |
|
| 99 | + /** |
|
| 100 | + * Gets all tables of this schema. |
|
| 101 | + * |
|
| 102 | + * @return Table[] |
|
| 103 | + */ |
|
| 104 | + public function getTables() |
|
| 105 | + { |
|
| 106 | + } |
|
| 107 | 107 | |
| 108 | - /** |
|
| 109 | - * @param string $name |
|
| 110 | - * |
|
| 111 | - * @return Table |
|
| 112 | - * |
|
| 113 | - * @throws SchemaException |
|
| 114 | - */ |
|
| 115 | - public function getTable($name) |
|
| 116 | - { |
|
| 117 | - } |
|
| 108 | + /** |
|
| 109 | + * @param string $name |
|
| 110 | + * |
|
| 111 | + * @return Table |
|
| 112 | + * |
|
| 113 | + * @throws SchemaException |
|
| 114 | + */ |
|
| 115 | + public function getTable($name) |
|
| 116 | + { |
|
| 117 | + } |
|
| 118 | 118 | |
| 119 | - /** |
|
| 120 | - * Does this schema have a namespace with the given name? |
|
| 121 | - * |
|
| 122 | - * @param string $name |
|
| 123 | - * |
|
| 124 | - * @return bool |
|
| 125 | - */ |
|
| 126 | - public function hasNamespace($name) |
|
| 127 | - { |
|
| 128 | - } |
|
| 119 | + /** |
|
| 120 | + * Does this schema have a namespace with the given name? |
|
| 121 | + * |
|
| 122 | + * @param string $name |
|
| 123 | + * |
|
| 124 | + * @return bool |
|
| 125 | + */ |
|
| 126 | + public function hasNamespace($name) |
|
| 127 | + { |
|
| 128 | + } |
|
| 129 | 129 | |
| 130 | - /** |
|
| 131 | - * Does this schema have a table with the given name? |
|
| 132 | - * |
|
| 133 | - * @param string $name |
|
| 134 | - * |
|
| 135 | - * @return bool |
|
| 136 | - */ |
|
| 137 | - public function hasTable($name) |
|
| 138 | - { |
|
| 139 | - } |
|
| 130 | + /** |
|
| 131 | + * Does this schema have a table with the given name? |
|
| 132 | + * |
|
| 133 | + * @param string $name |
|
| 134 | + * |
|
| 135 | + * @return bool |
|
| 136 | + */ |
|
| 137 | + public function hasTable($name) |
|
| 138 | + { |
|
| 139 | + } |
|
| 140 | 140 | |
| 141 | - /** |
|
| 142 | - * Gets all table names, prefixed with a schema name, even the default one if present. |
|
| 143 | - * |
|
| 144 | - * @deprecated Use {@see getTables()} and {@see Table::getName()} instead. |
|
| 145 | - * |
|
| 146 | - * @return string[] |
|
| 147 | - */ |
|
| 148 | - public function getTableNames() |
|
| 149 | - { |
|
| 150 | - } |
|
| 141 | + /** |
|
| 142 | + * Gets all table names, prefixed with a schema name, even the default one if present. |
|
| 143 | + * |
|
| 144 | + * @deprecated Use {@see getTables()} and {@see Table::getName()} instead. |
|
| 145 | + * |
|
| 146 | + * @return string[] |
|
| 147 | + */ |
|
| 148 | + public function getTableNames() |
|
| 149 | + { |
|
| 150 | + } |
|
| 151 | 151 | |
| 152 | - /** |
|
| 153 | - * @param string $name |
|
| 154 | - * |
|
| 155 | - * @return bool |
|
| 156 | - */ |
|
| 157 | - public function hasSequence($name) |
|
| 158 | - { |
|
| 159 | - } |
|
| 152 | + /** |
|
| 153 | + * @param string $name |
|
| 154 | + * |
|
| 155 | + * @return bool |
|
| 156 | + */ |
|
| 157 | + public function hasSequence($name) |
|
| 158 | + { |
|
| 159 | + } |
|
| 160 | 160 | |
| 161 | - /** |
|
| 162 | - * @param string $name |
|
| 163 | - * |
|
| 164 | - * @return Sequence |
|
| 165 | - * |
|
| 166 | - * @throws SchemaException |
|
| 167 | - */ |
|
| 168 | - public function getSequence($name) |
|
| 169 | - { |
|
| 170 | - } |
|
| 161 | + /** |
|
| 162 | + * @param string $name |
|
| 163 | + * |
|
| 164 | + * @return Sequence |
|
| 165 | + * |
|
| 166 | + * @throws SchemaException |
|
| 167 | + */ |
|
| 168 | + public function getSequence($name) |
|
| 169 | + { |
|
| 170 | + } |
|
| 171 | 171 | |
| 172 | - /** @return Sequence[] */ |
|
| 173 | - public function getSequences() |
|
| 174 | - { |
|
| 175 | - } |
|
| 172 | + /** @return Sequence[] */ |
|
| 173 | + public function getSequences() |
|
| 174 | + { |
|
| 175 | + } |
|
| 176 | 176 | |
| 177 | - /** |
|
| 178 | - * Creates a new namespace. |
|
| 179 | - * |
|
| 180 | - * @param string $name The name of the namespace to create. |
|
| 181 | - * |
|
| 182 | - * @return Schema This schema instance. |
|
| 183 | - * |
|
| 184 | - * @throws SchemaException |
|
| 185 | - */ |
|
| 186 | - public function createNamespace($name) |
|
| 187 | - { |
|
| 188 | - } |
|
| 177 | + /** |
|
| 178 | + * Creates a new namespace. |
|
| 179 | + * |
|
| 180 | + * @param string $name The name of the namespace to create. |
|
| 181 | + * |
|
| 182 | + * @return Schema This schema instance. |
|
| 183 | + * |
|
| 184 | + * @throws SchemaException |
|
| 185 | + */ |
|
| 186 | + public function createNamespace($name) |
|
| 187 | + { |
|
| 188 | + } |
|
| 189 | 189 | |
| 190 | - /** |
|
| 191 | - * Creates a new table. |
|
| 192 | - * |
|
| 193 | - * @param string $name |
|
| 194 | - * |
|
| 195 | - * @return Table |
|
| 196 | - * |
|
| 197 | - * @throws SchemaException |
|
| 198 | - */ |
|
| 199 | - public function createTable($name) |
|
| 200 | - { |
|
| 201 | - } |
|
| 190 | + /** |
|
| 191 | + * Creates a new table. |
|
| 192 | + * |
|
| 193 | + * @param string $name |
|
| 194 | + * |
|
| 195 | + * @return Table |
|
| 196 | + * |
|
| 197 | + * @throws SchemaException |
|
| 198 | + */ |
|
| 199 | + public function createTable($name) |
|
| 200 | + { |
|
| 201 | + } |
|
| 202 | 202 | |
| 203 | - /** |
|
| 204 | - * Renames a table. |
|
| 205 | - * |
|
| 206 | - * @param string $oldName |
|
| 207 | - * @param string $newName |
|
| 208 | - * |
|
| 209 | - * @return Schema |
|
| 210 | - * |
|
| 211 | - * @throws SchemaException |
|
| 212 | - */ |
|
| 213 | - public function renameTable($oldName, $newName) |
|
| 214 | - { |
|
| 215 | - } |
|
| 203 | + /** |
|
| 204 | + * Renames a table. |
|
| 205 | + * |
|
| 206 | + * @param string $oldName |
|
| 207 | + * @param string $newName |
|
| 208 | + * |
|
| 209 | + * @return Schema |
|
| 210 | + * |
|
| 211 | + * @throws SchemaException |
|
| 212 | + */ |
|
| 213 | + public function renameTable($oldName, $newName) |
|
| 214 | + { |
|
| 215 | + } |
|
| 216 | 216 | |
| 217 | - /** |
|
| 218 | - * Drops a table from the schema. |
|
| 219 | - * |
|
| 220 | - * @param string $name |
|
| 221 | - * |
|
| 222 | - * @return Schema |
|
| 223 | - * |
|
| 224 | - * @throws SchemaException |
|
| 225 | - */ |
|
| 226 | - public function dropTable($name) |
|
| 227 | - { |
|
| 228 | - } |
|
| 217 | + /** |
|
| 218 | + * Drops a table from the schema. |
|
| 219 | + * |
|
| 220 | + * @param string $name |
|
| 221 | + * |
|
| 222 | + * @return Schema |
|
| 223 | + * |
|
| 224 | + * @throws SchemaException |
|
| 225 | + */ |
|
| 226 | + public function dropTable($name) |
|
| 227 | + { |
|
| 228 | + } |
|
| 229 | 229 | |
| 230 | - /** |
|
| 231 | - * Creates a new sequence. |
|
| 232 | - * |
|
| 233 | - * @param string $name |
|
| 234 | - * @param int $allocationSize |
|
| 235 | - * @param int $initialValue |
|
| 236 | - * |
|
| 237 | - * @return Sequence |
|
| 238 | - * |
|
| 239 | - * @throws SchemaException |
|
| 240 | - */ |
|
| 241 | - public function createSequence($name, $allocationSize = 1, $initialValue = 1) |
|
| 242 | - { |
|
| 243 | - } |
|
| 230 | + /** |
|
| 231 | + * Creates a new sequence. |
|
| 232 | + * |
|
| 233 | + * @param string $name |
|
| 234 | + * @param int $allocationSize |
|
| 235 | + * @param int $initialValue |
|
| 236 | + * |
|
| 237 | + * @return Sequence |
|
| 238 | + * |
|
| 239 | + * @throws SchemaException |
|
| 240 | + */ |
|
| 241 | + public function createSequence($name, $allocationSize = 1, $initialValue = 1) |
|
| 242 | + { |
|
| 243 | + } |
|
| 244 | 244 | |
| 245 | - /** |
|
| 246 | - * @param string $name |
|
| 247 | - * |
|
| 248 | - * @return Schema |
|
| 249 | - */ |
|
| 250 | - public function dropSequence($name) |
|
| 251 | - { |
|
| 252 | - } |
|
| 245 | + /** |
|
| 246 | + * @param string $name |
|
| 247 | + * |
|
| 248 | + * @return Schema |
|
| 249 | + */ |
|
| 250 | + public function dropSequence($name) |
|
| 251 | + { |
|
| 252 | + } |
|
| 253 | 253 | |
| 254 | - /** |
|
| 255 | - * Returns an array of necessary SQL queries to create the schema on the given platform. |
|
| 256 | - * |
|
| 257 | - * @return list<string> |
|
| 258 | - * |
|
| 259 | - * @throws Exception |
|
| 260 | - */ |
|
| 261 | - public function toSql(AbstractPlatform $platform) |
|
| 262 | - { |
|
| 263 | - } |
|
| 254 | + /** |
|
| 255 | + * Returns an array of necessary SQL queries to create the schema on the given platform. |
|
| 256 | + * |
|
| 257 | + * @return list<string> |
|
| 258 | + * |
|
| 259 | + * @throws Exception |
|
| 260 | + */ |
|
| 261 | + public function toSql(AbstractPlatform $platform) |
|
| 262 | + { |
|
| 263 | + } |
|
| 264 | 264 | |
| 265 | - /** |
|
| 266 | - * Return an array of necessary SQL queries to drop the schema on the given platform. |
|
| 267 | - * |
|
| 268 | - * @return list<string> |
|
| 269 | - * |
|
| 270 | - * @throws Exception |
|
| 271 | - */ |
|
| 272 | - public function toDropSql(AbstractPlatform $platform) |
|
| 273 | - { |
|
| 274 | - } |
|
| 265 | + /** |
|
| 266 | + * Return an array of necessary SQL queries to drop the schema on the given platform. |
|
| 267 | + * |
|
| 268 | + * @return list<string> |
|
| 269 | + * |
|
| 270 | + * @throws Exception |
|
| 271 | + */ |
|
| 272 | + public function toDropSql(AbstractPlatform $platform) |
|
| 273 | + { |
|
| 274 | + } |
|
| 275 | 275 | |
| 276 | - /** |
|
| 277 | - * @deprecated |
|
| 278 | - * |
|
| 279 | - * @return string[] |
|
| 280 | - * |
|
| 281 | - * @throws SchemaException |
|
| 282 | - */ |
|
| 283 | - public function getMigrateToSql(Schema $toSchema, AbstractPlatform $platform) |
|
| 284 | - { |
|
| 285 | - } |
|
| 276 | + /** |
|
| 277 | + * @deprecated |
|
| 278 | + * |
|
| 279 | + * @return string[] |
|
| 280 | + * |
|
| 281 | + * @throws SchemaException |
|
| 282 | + */ |
|
| 283 | + public function getMigrateToSql(Schema $toSchema, AbstractPlatform $platform) |
|
| 284 | + { |
|
| 285 | + } |
|
| 286 | 286 | |
| 287 | - /** |
|
| 288 | - * @deprecated |
|
| 289 | - * |
|
| 290 | - * @return string[] |
|
| 291 | - * |
|
| 292 | - * @throws SchemaException |
|
| 293 | - */ |
|
| 294 | - public function getMigrateFromSql(Schema $fromSchema, AbstractPlatform $platform) |
|
| 295 | - { |
|
| 296 | - } |
|
| 287 | + /** |
|
| 288 | + * @deprecated |
|
| 289 | + * |
|
| 290 | + * @return string[] |
|
| 291 | + * |
|
| 292 | + * @throws SchemaException |
|
| 293 | + */ |
|
| 294 | + public function getMigrateFromSql(Schema $fromSchema, AbstractPlatform $platform) |
|
| 295 | + { |
|
| 296 | + } |
|
| 297 | 297 | |
| 298 | - /** |
|
| 299 | - * @deprecated |
|
| 300 | - * |
|
| 301 | - * @return void |
|
| 302 | - */ |
|
| 303 | - public function visit(Visitor $visitor) |
|
| 304 | - { |
|
| 305 | - } |
|
| 298 | + /** |
|
| 299 | + * @deprecated |
|
| 300 | + * |
|
| 301 | + * @return void |
|
| 302 | + */ |
|
| 303 | + public function visit(Visitor $visitor) |
|
| 304 | + { |
|
| 305 | + } |
|
| 306 | 306 | |
| 307 | - /** |
|
| 308 | - * Cloning a Schema triggers a deep clone of all related assets. |
|
| 309 | - * |
|
| 310 | - * @return void |
|
| 311 | - */ |
|
| 312 | - public function __clone() |
|
| 313 | - { |
|
| 314 | - } |
|
| 307 | + /** |
|
| 308 | + * Cloning a Schema triggers a deep clone of all related assets. |
|
| 309 | + * |
|
| 310 | + * @return void |
|
| 311 | + */ |
|
| 312 | + public function __clone() |
|
| 313 | + { |
|
| 314 | + } |
|
| 315 | 315 | } |