top

Package migration automatically handles versioning of a database schema by applying a series of migrations supplied by the client. It uses features only from the database/sql package, so it tries to be driver independent. However, to track the version of the database, it is necessary to execute some SQL. I've made an effort to keep those queries simple, but if they don't work with your database, you may override them.

This package works by applying a series of migrations to a database. Once a migration is created, it should never be changed. Every time a database is opened with this package, all necessary migrations are executed in a single transaction. If any part of the process fails, an error is returned and the transaction is rolled back so that the database is left untouched. (Note that for this to be useful, you'll need to use a database that supports rolling back changes to your schema. Notably, MySQL does not support this, although SQLite and PostgreSQL do.)

The version of a database is defined as the number of migrations applied to it.

Imported by 105 package(s) ΒΆ

  1. github.com/BlakeMesdag/drone/server/datastore/database
  2. github.com/BlakeMesdag/drone/server/datastore/migrate
  3. github.com/BurntSushi/goim/imdb
  4. github.com/Datacom/drone/server/datastore/database
  5. github.com/Datacom/drone/server/datastore/migrate
  6. github.com/DualSpark/drone/server/datastore/database
  7. github.com/DualSpark/drone/server/datastore/migrate
  8. github.com/FidelityInternational/atc/db/migrations
  9. github.com/FidelityInternational/atc/postgresrunner
  10. github.com/IMQS/authaus
  11. github.com/IMQS/messaging
  12. github.com/MakoTano/go_mingration_tool_sample/migration
  13. github.com/MerlinDMC/drone/server/datastore/database
  14. github.com/MerlinDMC/drone/server/datastore/migrate
  15. github.com/antonikonovalov/drone/server/datastore/database
  16. github.com/antonikonovalov/drone/server/datastore/migrate
  17. github.com/anweiss/drone/server/datastore/database
  18. github.com/anweiss/drone/server/datastore/migrate
  19. github.com/apriendeau/drone/server/datastore/database
  20. github.com/apriendeau/drone/server/datastore/migrate
  21. github.com/asdine/drone/server/datastore/database
  22. github.com/asdine/drone/server/datastore/migrate
  23. github.com/aykutaras/drone/server/datastore/database
  24. github.com/aykutaras/drone/server/datastore/migrate
  25. github.com/byxorna/drone/server/datastore/database
  26. github.com/byxorna/drone/server/datastore/migrate
  27. github.com/chango/drone/server/datastore/database
  28. github.com/chango/drone/server/datastore/migrate
  29. github.com/cloudfoundry/config-server/store
  30. github.com/cloudfoundry/config-server/store/db_migrations
  31. github.com/cloudfoundry/config-server/store/storefakes
  32. github.com/concourse/atc/db/migrations
  33. github.com/concourse/atc/postgresrunner
  34. github.com/contraband/checkin/db/migrations
  35. github.com/contraband/checkin/db/postgresrunner
  36. github.com/cunnie/atc/db/migrations
  37. github.com/cunnie/atc/postgresrunner
  38. github.com/danmane/abalone/go/api/db
  39. github.com/danmane/abalone/go/api/migrations
  40. github.com/dave-tucker/drone/server/datastore/database
  41. github.com/dave-tucker/drone/server/datastore/migrate
  42. github.com/dbongo/hackapp/datastore/database
  43. github.com/dbongo/hackapp/datastore/migrate
  44. github.com/dcondomitti/drone/server/datastore/database
  45. github.com/dcondomitti/drone/server/datastore/migrate
  46. github.com/drone/drone-dart/datastore/datasql
  47. github.com/drone/drone-dart/datastore/migrate
  48. github.com/etix/drone/server/datastore/database
  49. github.com/etix/drone/server/datastore/migrate
  50. github.com/gedex/simdoc/pkg/datastore/database
  51. github.com/gedex/simdoc/pkg/datastore/migrate
  52. github.com/gregory90/drone/server/datastore/database
  53. github.com/gregory90/drone/server/datastore/migrate
  54. github.com/hanxue/drone/server/datastore/database
  55. github.com/hanxue/drone/server/datastore/migrate
  56. github.com/hkjn/drone/server/datastore/database
  57. github.com/hkjn/drone/server/datastore/migrate
  58. github.com/jrossi/drone/server/datastore/database
  59. github.com/jrossi/drone/server/datastore/migrate
  60. github.com/lins05/drone/server/datastore/database
  61. github.com/lins05/drone/server/datastore/migrate
  62. github.com/lowstz/drone/server/datastore/database
  63. github.com/lowstz/drone/server/datastore/migrate
  64. github.com/mmb/atc/db/migrations
  65. github.com/mmb/atc/postgresrunner
  66. github.com/movableink/drone/server/datastore/database
  67. github.com/movableink/drone/server/datastore/migrate
  68. github.com/ndlib/bendo/server
  69. github.com/needf/drone/server/datastore/database
  70. github.com/needf/drone/server/datastore/migrate
  71. github.com/oppegard/atc/postgresrunner
  72. github.com/pilu/drone/server/datastore/database
  73. github.com/pilu/drone/server/datastore/migrate
  74. github.com/rancher/drone/server/datastore/database
  75. github.com/rancher/drone/server/datastore/migrate
  76. github.com/reinbach/drone/server/datastore/database
  77. github.com/reinbach/drone/server/datastore/migrate
  78. github.com/rics3n/drone/server/datastore/database
  79. github.com/rics3n/drone/server/datastore/migrate
  80. github.com/robdimsdale/atc/db/migrations
  81. github.com/robdimsdale/atc/postgresrunner
  82. github.com/roth1002/drone/server/datastore/database
  83. github.com/roth1002/drone/server/datastore/migrate
  84. github.com/savaki/atc/db/migrations
  85. github.com/savaki/atc/postgresrunner
  86. github.com/scrapinghub/drone/server/datastore/database
  87. github.com/scrapinghub/drone/server/datastore/migrate
  88. github.com/sdd330/drone/server/datastore/database
  89. github.com/sdd330/drone/server/datastore/migrate
  90. github.com/sgotti/drone/server/datastore/database
  91. github.com/sgotti/drone/server/datastore/migrate
  92. github.com/shinji62/atc/db/migrations
  93. github.com/shinji62/atc/postgresrunner
  94. github.com/tobscher/drone/server/datastore/database
  95. github.com/tobscher/drone/server/datastore/migrate
  96. github.com/vsheffer/drone/server/datastore/database
  97. github.com/vsheffer/drone/server/datastore/migrate
  98. github.com/xoebus/checkin/db/migrations
  99. github.com/xoebus/checkin/db/postgresrunner
  100. github.com/yanana/atc/db/migrations
  101. github.com/yanana/atc/postgresrunner
  102. github.com/zachgersh/atc/db/migrations
  103. github.com/zachgersh/atc/postgresrunner
  104. github.com/zscawd12/drone/server/datastore/database
  105. github.com/zscawd12/drone/server/datastore/migrate