1
0

UPGRADING.rst 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. Upgrading Pagure
  2. ================
  3. From 2.1 to 2.2
  4. ---------------
  5. 2.2 brings a number of bug fixes and a few improvements.
  6. One of the major changes impacts the databases where we must change some of the
  7. table so that the foreign key cascade on delete (fixes deleting a project when a
  8. few plugins were activated).
  9. When upgrading for 2.1 to 2.2 all you will have to do is:
  10. * Update the database scheme using alembic: ``alembic upgrade head``
  11. .. note:: If you run another database system than PostgreSQL the alembic
  12. revision ``317a285e04a8_delete_hooks.py`` will require adjustment as the
  13. foreign key constraints are named and the names are driver dependant.
  14. From 2.0 to 2.1
  15. ---------------
  16. 2.1 brings its usual flow of improvements and bug fixes.
  17. When upgrading from 2.0.x to 2.1 all you will have to:
  18. * Update the database schame using alembic: ``alembic upgrade head``
  19. From 1.x to 2.0
  20. ---------------
  21. As the version change indicates, 2.0 brings quite a number of changes,
  22. including some that are not backward compatible.
  23. When upgrading to 2.0 you will have to:
  24. * Update the database schema using alembic: ``alembic upgrade head``
  25. * Create the new DB tables so that the new plugins work using the
  26. ``createdb.py`` script
  27. * Move the forks git repo
  28. Forked git repos are now located under the same folder as the regular git
  29. repos, just under a ``forks/`` subfolder.
  30. So the structure changes from: ::
  31. repos/
  32. ├── foo.git
  33. └── bar.git
  34. forks/
  35. ├── patrick/
  36. │  ├── test.git
  37. │  └── ipsilon.git
  38. └── pingou/
  39. ├── foo.git
  40. └── bar.git
  41. to: ::
  42. repos/
  43. ├── foo.git
  44. ├── bar.git
  45. └── forks/
  46. ├── patrick/
  47. │  ├── test.git
  48. │  └── ipsilon.git
  49. └── pingou/
  50. ├── foo.git
  51. └── bar.git
  52. So the entire ``forks`` folder is moved under the ``repos`` folder where
  53. the other repositories are, containing the sources of the projects.
  54. Git repos for ``tickets``, ``requests`` and ``docs`` will be trickier to
  55. move as the structure changes from: ::
  56. tickets/
  57. ├── foo.git
  58. ├── bar.git
  59. ├── patrick/
  60. │  ├── test.git
  61. │  └── ipsilon.git
  62. └── pingou/
  63. ├── foo.git
  64. └── bar.git
  65. to: ::
  66. tickets/
  67. ├── foo.git
  68. ├── bar.git
  69. └── forks/
  70. ├── patrick/
  71. │  ├── test.git
  72. │  └── ipsilon.git
  73. └── pingou/
  74. ├── foo.git
  75. └── bar.git
  76. Same for the ``requests`` and the ``docs`` git repos.
  77. As you can see in the ``tickets``, ``requests`` and ``docs`` folders there
  78. are two types of folders, git repos which are folder with a name ending
  79. with ``.git``, and folder corresponding to usernames. These last ones are
  80. the ones to be moved into a subfolder ``forks/``.
  81. This can be done using something like: ::
  82. mkdir forks
  83. for i in `ls -1 |grep -v '\.git'`; do mv $i forks/; done
  84. * Re-generate the gitolite configuration.
  85. This can be done via the ``Re-generate gitolite ACLs file`` button in the
  86. admin page.
  87. * Keep URLs backward compatible
  88. The support of pseudo-namespace in pagure 2.0 has required some changes
  89. to the URL schema:
  90. https://pagure.io/pagure/053d8cc95fcd50c23a8b0a7f70e55f8d1cc7aebb
  91. became:
  92. https://pagure.io/pagure/c/053d8cc95fcd50c23a8b0a7f70e55f8d1cc7aebb
  93. (Note the added /c/ in it)
  94. We introduced a backward compatibility fix for this.
  95. This fix is however *disabled* by default so if you wish to keep the URLs
  96. valid, you will need to adjust you configuration file to include: ::
  97. OLD_VIEW_COMMIT_ENABLED = True