diff --git a/CHANGELOG.md b/CHANGELOG.md index 36b6ed9..fd1b283 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,35 +1,100 @@ # Changelog -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +All notable changes to this project will be documented in this file. -## [0.2.0](https://github.com/DataShades/ckanext-comments/compare/v0.1.2...v0.2.0) (2023-04-03) +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## [v0.3.0](https://github.com/DataShades/ckanext-comments/releases/tag/v0.3.0) - 2023-04-11 -### ⚠ BREAKING CHANGES - -* replace const module with config +[Compare with v0.1.2](https://github.com/DataShades/ckanext-comments/compare/v0.1.2...v0.3.0) ### Features -* replace const module with config ([6fe009b](https://github.com/DataShades/ckanext-comments/commit/6fe009be3510bcaa06d6bb5b14fc888896a5d517)) +- replace const module with config ([6fe009b](https://github.com/DataShades/ckanext-comments/commit/6fe009be3510bcaa06d6bb5b14fc888896a5d517) by Sergey Motornyuk). + +### Bug Fixes + +- resolve circular import of Thread from Comment ([9054878](https://github.com/DataShades/ckanext-comments/commit/905487830017cc13bcbab4d27ce448bcc705c16c) by Sergey Motornyuk). + +## [v0.1.2](https://github.com/DataShades/ckanext-comments/releases/tag/v0.1.2) - 2023-03-03 +[Compare with v0.1.0](https://github.com/DataShades/ckanext-comments/compare/v0.1.0...v0.1.2) ### Bug Fixes -* resolve circular import of Thread from Comment ([9054878](https://github.com/DataShades/ckanext-comments/commit/905487830017cc13bcbab4d27ce448bcc705c16c)) +- add config declaration to manifest ([247df40](https://github.com/DataShades/ckanext-comments/commit/247df40982a2319b58cae902624c3f576fb87042) by Sergey Motornyuk). -### [0.1.2](https://github.com/DataShades/ckanext-comments/compare/v0.1.0...v0.1.2) (2023-03-03) +## [v0.1.0](https://github.com/DataShades/ckanext-comments/releases/tag/v0.1.0) - 2022-11-09 +[Compare with v0.0.19](https://github.com/DataShades/ckanext-comments/compare/v0.0.19...v0.1.0) ### Bug Fixes -* add config declaration to manifest ([247df40](https://github.com/DataShades/ckanext-comments/commit/247df40982a2319b58cae902624c3f576fb87042)) +- allow editing own draft comments by default ([fe83008](https://github.com/DataShades/ckanext-comments/commit/fe830083d80a0d494cb021ef42f9432b86dc811a) by Sergey Motornyuk). -### [0.1.1](https://github.com/DataShades/ckanext-comments/compare/v0.1.0...v0.1.1) (2023-03-01) +## [v0.0.19](https://github.com/DataShades/ckanext-comments/releases/tag/v0.0.19) - 2022-04-12 -## [0.1.0](https://github.com/DataShades/ckanext-comments/compare/v0.0.19...v0.1.0) (2022-11-09) +[Compare with v0.0.18](https://github.com/DataShades/ckanext-comments/compare/v0.0.18...v0.0.19) +## [v0.0.18](https://github.com/DataShades/ckanext-comments/releases/tag/v0.0.18) - 2022-03-31 -### Bug Fixes +[Compare with v0.0.17](https://github.com/DataShades/ckanext-comments/compare/v0.0.17...v0.0.18) + +## [v0.0.17](https://github.com/DataShades/ckanext-comments/releases/tag/v0.0.17) - 2022-03-29 + +[Compare with v0.0.16](https://github.com/DataShades/ckanext-comments/compare/v0.0.16...v0.0.17) + +## [v0.0.16](https://github.com/DataShades/ckanext-comments/releases/tag/v0.0.16) - 2021-12-10 + +[Compare with v0.0.15](https://github.com/DataShades/ckanext-comments/compare/v0.0.15...v0.0.16) + +## [v0.0.15](https://github.com/DataShades/ckanext-comments/releases/tag/v0.0.15) - 2021-12-10 + +[Compare with v0.0.13](https://github.com/DataShades/ckanext-comments/compare/v0.0.13...v0.0.15) + +## [v0.0.13](https://github.com/DataShades/ckanext-comments/releases/tag/v0.0.13) - 2021-12-09 + +[Compare with v0.0.12](https://github.com/DataShades/ckanext-comments/compare/v0.0.12...v0.0.13) + +## [v0.0.12](https://github.com/DataShades/ckanext-comments/releases/tag/v0.0.12) - 2021-12-09 + +[Compare with v0.0.11](https://github.com/DataShades/ckanext-comments/compare/v0.0.11...v0.0.12) + +## [v0.0.11](https://github.com/DataShades/ckanext-comments/releases/tag/v0.0.11) - 2021-12-08 + +[Compare with v0.0.10](https://github.com/DataShades/ckanext-comments/compare/v0.0.10...v0.0.11) + +## [v0.0.10](https://github.com/DataShades/ckanext-comments/releases/tag/v0.0.10) - 2021-10-29 + +[Compare with v0.0.9](https://github.com/DataShades/ckanext-comments/compare/v0.0.9...v0.0.10) + +## [v0.0.9](https://github.com/DataShades/ckanext-comments/releases/tag/v0.0.9) - 2021-05-17 + +[Compare with v0.0.8](https://github.com/DataShades/ckanext-comments/compare/v0.0.8...v0.0.9) + +## [v0.0.8](https://github.com/DataShades/ckanext-comments/releases/tag/v0.0.8) - 2021-04-26 + +[Compare with v0.0.6](https://github.com/DataShades/ckanext-comments/compare/v0.0.6...v0.0.8) + +## [v0.0.6](https://github.com/DataShades/ckanext-comments/releases/tag/v0.0.6) - 2021-03-31 + +[Compare with v0.0.5](https://github.com/DataShades/ckanext-comments/compare/v0.0.5...v0.0.6) + +## [v0.0.5](https://github.com/DataShades/ckanext-comments/releases/tag/v0.0.5) - 2021-03-29 + +[Compare with v0.0.4](https://github.com/DataShades/ckanext-comments/compare/v0.0.4...v0.0.5) + +## [v0.0.4](https://github.com/DataShades/ckanext-comments/releases/tag/v0.0.4) - 2021-03-26 + +[Compare with v0.0.3](https://github.com/DataShades/ckanext-comments/compare/v0.0.3...v0.0.4) + +## [v0.0.3](https://github.com/DataShades/ckanext-comments/releases/tag/v0.0.3) - 2021-03-26 + +[Compare with v0.0.2](https://github.com/DataShades/ckanext-comments/compare/v0.0.2...v0.0.3) + +## [v0.0.2](https://github.com/DataShades/ckanext-comments/releases/tag/v0.0.2) - 2021-03-25 + +[Compare with first commit](https://github.com/DataShades/ckanext-comments/compare/0bc74fb042ef7af60b0e900e50cfc6c15a94fb18...v0.0.2) -* allow editing own draft comments by default ([fe83008](https://github.com/DataShades/ckanext-comments/commit/fe830083d80a0d494cb021ef42f9432b86dc811a)) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..787e9b3 --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +.DEFAULT_GOAL := help +.PHONY = help + +help: + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' + + +changelog: ## compile changelog + git changelog -c conventional -o CHANGELOG.md diff --git a/ckanext/comments/migration/comments/versions/910f3d575038_add_cascade_to_comments.py b/ckanext/comments/migration/comments/versions/910f3d575038_add_cascade_to_comments.py new file mode 100644 index 0000000..09fccbb --- /dev/null +++ b/ckanext/comments/migration/comments/versions/910f3d575038_add_cascade_to_comments.py @@ -0,0 +1,42 @@ +"""add cascade to comments + +Revision ID: 910f3d575038 +Revises: 275515c51af1 +Create Date: 2023-10-06 22:54:18.933232 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = "910f3d575038" +down_revision = "275515c51af1" +branch_labels = None +depends_on = None + + +def upgrade(): + op.drop_constraint("comments_comments_thread_id_fkey", "comments_comments") + op.drop_constraint("comments_comments_reply_to_id_fkey", "comments_comments") + + op.create_foreign_key( + "comments_comments_thread_id_fkey", + "comments_comments", + "comments_threads", + ["thread_id"], + ["id"], + ondelete="CASCADE", + ) + op.create_foreign_key( + "comments_comments_reply_to_id_fkey", + "comments_comments", + "comments_comments", + ["reply_to_id"], + ["id"], + ondelete="CASCADE", + ) + + +def downgrade(): + pass