plain.redirection 0.33.0__tar.gz → 0.34.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (19) hide show
  1. {plain_redirection-0.33.0 → plain_redirection-0.34.0}/PKG-INFO +2 -2
  2. {plain_redirection-0.33.0 → plain_redirection-0.34.0}/plain/redirection/CHANGELOG.md +20 -0
  3. plain_redirection-0.34.0/plain/redirection/migrations/0002_rename_plainredire_created_d5f0c7_idx_plainredirection_notfoundlog_created_at_idx_and_more.py +32 -0
  4. plain_redirection-0.34.0/plain/redirection/migrations/0003_redirectlog_plainredirection_redirectlog_redirect_id_idx.py +26 -0
  5. {plain_redirection-0.33.0 → plain_redirection-0.34.0}/plain/redirection/models.py +18 -4
  6. {plain_redirection-0.33.0 → plain_redirection-0.34.0}/pyproject.toml +2 -2
  7. {plain_redirection-0.33.0 → plain_redirection-0.34.0}/.gitignore +0 -0
  8. {plain_redirection-0.33.0 → plain_redirection-0.34.0}/LICENSE +0 -0
  9. {plain_redirection-0.33.0 → plain_redirection-0.34.0}/README.md +0 -0
  10. {plain_redirection-0.33.0 → plain_redirection-0.34.0}/plain/redirection/README.md +0 -0
  11. {plain_redirection-0.33.0 → plain_redirection-0.34.0}/plain/redirection/__init__.py +0 -0
  12. {plain_redirection-0.33.0 → plain_redirection-0.34.0}/plain/redirection/admin.py +0 -0
  13. {plain_redirection-0.33.0 → plain_redirection-0.34.0}/plain/redirection/chores.py +0 -0
  14. {plain_redirection-0.33.0 → plain_redirection-0.34.0}/plain/redirection/config.py +0 -0
  15. {plain_redirection-0.33.0 → plain_redirection-0.34.0}/plain/redirection/default_settings.py +0 -0
  16. {plain_redirection-0.33.0 → plain_redirection-0.34.0}/plain/redirection/middleware.py +0 -0
  17. {plain_redirection-0.33.0 → plain_redirection-0.34.0}/plain/redirection/migrations/0001_initial.py +0 -0
  18. {plain_redirection-0.33.0 → plain_redirection-0.34.0}/plain/redirection/migrations/__init__.py +0 -0
  19. {plain_redirection-0.33.0 → plain_redirection-0.34.0}/plain/redirection/templates/admin/plainredirection/redirect_form.html +0 -0
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain.redirection
3
- Version: 0.33.0
3
+ Version: 0.34.0
4
4
  Summary: A flexible URL redirection system with admin interface and logging.
5
5
  Author-email: Dave Gaeddert <dave.gaeddert@dropseed.dev>
6
6
  License-Expression: BSD-3-Clause
7
7
  License-File: LICENSE
8
8
  Requires-Python: >=3.13
9
- Requires-Dist: plain-postgres<1.0.0,>=0.84.0
9
+ Requires-Dist: plain-postgres<1.0.0,>=0.89.0
10
10
  Requires-Dist: plain<1.0.0,>=0.123.0
11
11
  Description-Content-Type: text/markdown
12
12
 
@@ -1,5 +1,25 @@
1
1
  # plain-redirection changelog
2
2
 
3
+ ## [0.34.0](https://github.com/dropseed/plain/releases/plain-redirection@0.34.0) (2026-03-25)
4
+
5
+ ### What's changed
6
+
7
+ - Added explicit `Index` on `RedirectLog.redirect` FK field — replaces the old auto-created index from `db_index=True`. Migration drops the orphan auto-index and creates the new named index. ([061b97f5d538](https://github.com/dropseed/plain/commit/061b97f5d538))
8
+
9
+ ### Upgrade instructions
10
+
11
+ - Requires `plain-postgres>=0.89.0`. Run `uv run plain postgres migrate`.
12
+
13
+ ## [0.33.1](https://github.com/dropseed/plain/releases/plain-redirection@0.33.1) (2026-03-25)
14
+
15
+ ### What's changed
16
+
17
+ - Renamed indexes to use readable `{table}_{column}_idx` naming convention, replacing the old truncated hash-based names. Includes a migration with `RenameIndex` operations (instant `ALTER INDEX RENAME`, no locks). ([74aa8b76aa40](https://github.com/dropseed/plain/commit/74aa8b76aa40))
18
+
19
+ ### Upgrade instructions
20
+
21
+ - Run `plain migrate` to apply the index rename migration. This is an instant metadata-only operation with no performance impact.
22
+
3
23
  ## [0.33.0](https://github.com/dropseed/plain/releases/plain-redirection@0.33.0) (2026-03-12)
4
24
 
5
25
  ### What's changed
@@ -0,0 +1,32 @@
1
+ # Generated by Plain 0.127.2 on 2026-03-25 20:19
2
+
3
+ from plain.postgres import migrations
4
+
5
+
6
+ class Migration(migrations.Migration):
7
+ dependencies = [
8
+ ("plainredirection", "0001_initial"),
9
+ ]
10
+
11
+ operations = [
12
+ migrations.RenameIndex(
13
+ model_name="notfoundlog",
14
+ new_name="plainredirection_notfoundlog_created_at_idx",
15
+ old_name="plainredire_created_d5f0c7_idx",
16
+ ),
17
+ migrations.RenameIndex(
18
+ model_name="redirect",
19
+ new_name="plainredirection_redirect_order_idx",
20
+ old_name="plainredire_order_44dde0_idx",
21
+ ),
22
+ migrations.RenameIndex(
23
+ model_name="redirect",
24
+ new_name="plainredirection_redirect_created_at_idx",
25
+ old_name="plainredire_created_18c288_idx",
26
+ ),
27
+ migrations.RenameIndex(
28
+ model_name="redirectlog",
29
+ new_name="plainredirection_redirectlog_created_at_idx",
30
+ old_name="plainredire_created_5d75f4_idx",
31
+ ),
32
+ ]
@@ -0,0 +1,26 @@
1
+ # Generated by Plain 0.127.2 on 2026-03-25 22:04
2
+
3
+ from plain import postgres
4
+ from plain.postgres import migrations
5
+
6
+
7
+ class Migration(migrations.Migration):
8
+ dependencies = [
9
+ (
10
+ "plainredirection",
11
+ "0002_rename_plainredire_created_d5f0c7_idx_plainredirection_notfoundlog_created_at_idx_and_more",
12
+ ),
13
+ ]
14
+
15
+ operations = [
16
+ # Drop orphan auto-index from old db_index=True default
17
+ migrations.RunSQL(
18
+ 'DROP INDEX IF EXISTS "plainredirection_redirectlog_redirect_id_72c2ae26"'
19
+ ),
20
+ migrations.AddIndex(
21
+ model_name="redirectlog",
22
+ index=postgres.Index(
23
+ fields=["redirect"], name="plainredirection_redirectlog_redirect_id_idx"
24
+ ),
25
+ ),
26
+ ]
@@ -35,8 +35,12 @@ class Redirect(postgres.Model):
35
35
  model_options = postgres.Options(
36
36
  ordering=["order", "-created_at"],
37
37
  indexes=[
38
- postgres.Index(fields=["order"]),
39
- postgres.Index(fields=["created_at"]),
38
+ postgres.Index(
39
+ name="plainredirection_redirect_order_idx", fields=["order"]
40
+ ),
41
+ postgres.Index(
42
+ name="plainredirection_redirect_created_at_idx", fields=["created_at"]
43
+ ),
40
44
  ],
41
45
  constraints=[
42
46
  postgres.UniqueConstraint(
@@ -101,7 +105,14 @@ class RedirectLog(postgres.Model):
101
105
  model_options = postgres.Options(
102
106
  ordering=["-created_at"],
103
107
  indexes=[
104
- postgres.Index(fields=["created_at"]),
108
+ postgres.Index(
109
+ name="plainredirection_redirectlog_created_at_idx",
110
+ fields=["created_at"],
111
+ ),
112
+ postgres.Index(
113
+ name="plainredirection_redirectlog_redirect_id_idx",
114
+ fields=["redirect"],
115
+ ),
105
116
  ],
106
117
  )
107
118
 
@@ -143,7 +154,10 @@ class NotFoundLog(postgres.Model):
143
154
  model_options = postgres.Options(
144
155
  ordering=["-created_at"],
145
156
  indexes=[
146
- postgres.Index(fields=["created_at"]),
157
+ postgres.Index(
158
+ name="plainredirection_notfoundlog_created_at_idx",
159
+ fields=["created_at"],
160
+ ),
147
161
  ],
148
162
  )
149
163
 
@@ -1,12 +1,12 @@
1
1
  [project]
2
2
  name = "plain.redirection"
3
- version = "0.33.0"
3
+ version = "0.34.0"
4
4
  description = "A flexible URL redirection system with admin interface and logging."
5
5
  authors = [{ name = "Dave Gaeddert", email = "dave.gaeddert@dropseed.dev" }]
6
6
  readme = "README.md"
7
7
  license = "BSD-3-Clause"
8
8
  requires-python = ">=3.13"
9
- dependencies = ["plain>=0.123.0,<1.0.0", "plain.postgres>=0.84.0,<1.0.0"]
9
+ dependencies = ["plain>=0.123.0,<1.0.0", "plain.postgres>=0.89.0,<1.0.0"]
10
10
 
11
11
  [tool.hatch.build.targets.wheel]
12
12
  packages = ["plain"]