SchemaSynchronizer.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. namespace Doctrine\DBAL\Schema\Synchronizer;
  3. use Doctrine\DBAL\Schema\Schema;
  4. /**
  5. * The synchronizer knows how to synchronize a schema with the configured
  6. * database.
  7. *
  8. * @deprecated
  9. */
  10. interface SchemaSynchronizer
  11. {
  12. /**
  13. * Gets the SQL statements that can be executed to create the schema.
  14. *
  15. * @return string[]
  16. */
  17. public function getCreateSchema(Schema $createSchema);
  18. /**
  19. * Gets the SQL Statements to update given schema with the underlying db.
  20. *
  21. * @param bool $noDrops
  22. *
  23. * @return string[]
  24. */
  25. public function getUpdateSchema(Schema $toSchema, $noDrops = false);
  26. /**
  27. * Gets the SQL Statements to drop the given schema from underlying db.
  28. *
  29. * @return string[]
  30. */
  31. public function getDropSchema(Schema $dropSchema);
  32. /**
  33. * Gets the SQL statements to drop all schema assets from underlying db.
  34. *
  35. * @return string[]
  36. */
  37. public function getDropAllSchema();
  38. /**
  39. * Creates the Schema.
  40. *
  41. * @return void
  42. */
  43. public function createSchema(Schema $createSchema);
  44. /**
  45. * Updates the Schema to new schema version.
  46. *
  47. * @param bool $noDrops
  48. *
  49. * @return void
  50. */
  51. public function updateSchema(Schema $toSchema, $noDrops = false);
  52. /**
  53. * Drops the given database schema from the underlying db.
  54. *
  55. * @return void
  56. */
  57. public function dropSchema(Schema $dropSchema);
  58. /**
  59. * Drops all assets from the underlying db.
  60. *
  61. * @return void
  62. */
  63. public function dropAllSchema();
  64. }