django-migrate-sql-deux 2.0.0__tar.gz → 3.0.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 (23) hide show
  1. {django_migrate_sql_deux-2.0.0 → django_migrate_sql_deux-3.0.0}/PKG-INFO +26 -23
  2. {django_migrate_sql_deux-2.0.0 → django_migrate_sql_deux-3.0.0}/README.md +23 -20
  3. {django_migrate_sql_deux-2.0.0 → django_migrate_sql_deux-3.0.0}/pyproject.toml +14 -14
  4. django_migrate_sql_deux-3.0.0/src/django_migrate_sql/__init__.py +1 -0
  5. {django_migrate_sql_deux-2.0.0 → django_migrate_sql_deux-3.0.0}/src/django_migrate_sql_deux.egg-info/PKG-INFO +26 -23
  6. django_migrate_sql_deux-2.0.0/src/django_migrate_sql/__init__.py +0 -1
  7. {django_migrate_sql_deux-2.0.0 → django_migrate_sql_deux-3.0.0}/LICENSE +0 -0
  8. {django_migrate_sql_deux-2.0.0 → django_migrate_sql_deux-3.0.0}/setup.cfg +0 -0
  9. {django_migrate_sql_deux-2.0.0 → django_migrate_sql_deux-3.0.0}/src/django_migrate_sql/autodetector.py +0 -0
  10. {django_migrate_sql_deux-2.0.0 → django_migrate_sql_deux-3.0.0}/src/django_migrate_sql/config.py +0 -0
  11. {django_migrate_sql_deux-2.0.0 → django_migrate_sql_deux-3.0.0}/src/django_migrate_sql/graph.py +0 -0
  12. {django_migrate_sql_deux-2.0.0 → django_migrate_sql_deux-3.0.0}/src/django_migrate_sql/management/__init__.py +0 -0
  13. {django_migrate_sql_deux-2.0.0 → django_migrate_sql_deux-3.0.0}/src/django_migrate_sql/management/commands/__init__.py +0 -0
  14. {django_migrate_sql_deux-2.0.0 → django_migrate_sql_deux-3.0.0}/src/django_migrate_sql/management/commands/makemigrations.py +0 -0
  15. {django_migrate_sql_deux-2.0.0 → django_migrate_sql_deux-3.0.0}/src/django_migrate_sql/management/commands/migrate.py +0 -0
  16. {django_migrate_sql_deux-2.0.0 → django_migrate_sql_deux-3.0.0}/src/django_migrate_sql/operations.py +0 -0
  17. {django_migrate_sql_deux-2.0.0 → django_migrate_sql_deux-3.0.0}/src/django_migrate_sql_deux.egg-info/SOURCES.txt +0 -0
  18. {django_migrate_sql_deux-2.0.0 → django_migrate_sql_deux-3.0.0}/src/django_migrate_sql_deux.egg-info/dependency_links.txt +0 -0
  19. {django_migrate_sql_deux-2.0.0 → django_migrate_sql_deux-3.0.0}/src/django_migrate_sql_deux.egg-info/requires.txt +0 -0
  20. {django_migrate_sql_deux-2.0.0 → django_migrate_sql_deux-3.0.0}/src/django_migrate_sql_deux.egg-info/top_level.txt +0 -0
  21. {django_migrate_sql_deux-2.0.0 → django_migrate_sql_deux-3.0.0}/tests/test_config.py +0 -0
  22. {django_migrate_sql_deux-2.0.0 → django_migrate_sql_deux-3.0.0}/tests/test_migrate_command.py +0 -0
  23. {django_migrate_sql_deux-2.0.0 → django_migrate_sql_deux-3.0.0}/tests/test_system_checks.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: django-migrate-sql-deux
3
- Version: 2.0.0
3
+ Version: 3.0.0
4
4
  Summary: Django Migrations for raw SQL
5
5
  Author-email: Bogdan Klichuk <klichukb@gmail.com>, Bruno Alla <oss@browniebroke.com>
6
6
  License-Expression: ISC
@@ -15,13 +15,13 @@ Classifier: Framework :: Django
15
15
  Classifier: Framework :: Django :: 5.2
16
16
  Classifier: Framework :: Django :: 6.0
17
17
  Classifier: Framework :: Django :: 6.1
18
- Classifier: Programming Language :: Python :: 3.10
19
18
  Classifier: Programming Language :: Python :: 3.11
20
19
  Classifier: Programming Language :: Python :: 3.12
21
20
  Classifier: Programming Language :: Python :: 3.13
22
21
  Classifier: Programming Language :: Python :: 3.14
22
+ Classifier: Programming Language :: Python :: 3.15
23
23
  Classifier: Topic :: Software Development :: Libraries
24
- Requires-Python: >=3.10
24
+ Requires-Python: >=3.11
25
25
  Description-Content-Type: text/markdown
26
26
  License-File: LICENSE
27
27
  Requires-Dist: django>=5.2
@@ -99,7 +99,7 @@ Add `django_migrate_sql` to `INSTALLED_APPS`:
99
99
  ```python
100
100
  INSTALLED_APPS = [
101
101
  # ...
102
- 'django_migrate_sql',
102
+ "django_migrate_sql",
103
103
  ]
104
104
  ```
105
105
 
@@ -111,9 +111,12 @@ If you want functionality from multiple `makemigrations` commands provided by ot
111
111
 
112
112
  ```python
113
113
  # app1/management/commands/makemigrations.py
114
- from django_linear_migrations.management.commands.makemigrations import Command as LinearMigrationsMakeMigrationsCommand
114
+ from django_linear_migrations.management.commands.makemigrations import (
115
+ Command as LinearMigrationsMakeMigrationsCommand,
116
+ )
115
117
  from django_migrate_sql.management.commands.makemigrations import DjangoMigrateSQLMixin
116
118
 
119
+
117
120
  class Command(DjangoMigrateSQLMixin, LinearMigrationsMakeMigrationsCommand):
118
121
  pass
119
122
  ```
@@ -179,7 +182,7 @@ Note that
179
182
 
180
183
  sql_items = [
181
184
  SQLItem(
182
- 'make_sum', # name of the item
185
+ "make_sum", # name of the item
183
186
  """
184
187
  create or replace function make_sum(a int, b int) returns int as $$
185
188
  begin
@@ -187,7 +190,7 @@ Note that
187
190
  end;
188
191
  $$ language plpgsql;
189
192
  """, # forward sql
190
- reverse_sql='drop function make_sum(int, int);', # sql for removal
193
+ reverse_sql="drop function make_sum(int, int);", # sql for removal
191
194
  ),
192
195
  ]
193
196
  ```
@@ -209,13 +212,13 @@ Note that
209
212
 
210
213
  class Migration(migrations.Migration):
211
214
  dependencies = [
212
- ('app_name', '0001_initial'),
215
+ ("app_name", "0001_initial"),
213
216
  ]
214
217
  operations = [
215
218
  django_migrate_sql.operations.CreateSQL(
216
- name='make_sum',
217
- sql='create or replace function make_sum(a int, b int) returns int as $$ begin return a + b; end; $$ language plpgsql;',
218
- reverse_sql='drop function make_sum(int, int);',
219
+ name="make_sum",
220
+ sql="create or replace function make_sum(a int, b int) returns int as $$ begin return a + b; end; $$ language plpgsql;",
221
+ reverse_sql="drop function make_sum(int, int);",
219
222
  ),
220
223
  ]
221
224
  ```
@@ -295,27 +298,27 @@ Now, say, you want to change the function implementation so that it takes a cust
295
298
 
296
299
  class Migration(migrations.Migration):
297
300
  dependencies = [
298
- ('app_name', '0002_xxxx'),
301
+ ("app_name", "0002_xxxx"),
299
302
  ]
300
303
  operations = [
301
304
  django_migrate_sql.operations.ReverseAlterSQL(
302
- name='make_sum',
303
- sql='drop function make_sum(int, int);',
304
- reverse_sql='create or replace function make_sum(a int, b int) returns int as $$ begin return a + b; end; $$ language plpgsql;',
305
+ name="make_sum",
306
+ sql="drop function make_sum(int, int);",
307
+ reverse_sql="create or replace function make_sum(a int, b int) returns int as $$ begin return a + b; end; $$ language plpgsql;",
305
308
  ),
306
309
  django_migrate_sql.operations.CreateSQL(
307
- name='mynum',
308
- sql='create type mynum as (num int, name varchar(20));',
309
- reverse_sql='drop type mynum;',
310
+ name="mynum",
311
+ sql="create type mynum as (num int, name varchar(20));",
312
+ reverse_sql="drop type mynum;",
310
313
  ),
311
314
  django_migrate_sql.operations.AlterSQL(
312
- name='make_sum',
313
- sql='create or replace function make_sum(a mynum, b mynum) returns mynum as $$ begin return (a.num + b.num, \'result\')::mynum; end; $$ language plpgsql;',
314
- reverse_sql='drop function make_sum(mynum, mynum);',
315
+ name="make_sum",
316
+ sql="create or replace function make_sum(a mynum, b mynum) returns mynum as $$ begin return (a.num + b.num, 'result')::mynum; end; $$ language plpgsql;",
317
+ reverse_sql="drop function make_sum(mynum, mynum);",
315
318
  ),
316
319
  django_migrate_sql.operations.AlterSQLState(
317
- name='make_sum',
318
- add_dependencies=[('app_name', 'mynum')],
320
+ name="make_sum",
321
+ add_dependencies=[("app_name", "mynum")],
319
322
  ),
320
323
  ]
321
324
  ```
@@ -70,7 +70,7 @@ Add `django_migrate_sql` to `INSTALLED_APPS`:
70
70
  ```python
71
71
  INSTALLED_APPS = [
72
72
  # ...
73
- 'django_migrate_sql',
73
+ "django_migrate_sql",
74
74
  ]
75
75
  ```
76
76
 
@@ -82,9 +82,12 @@ If you want functionality from multiple `makemigrations` commands provided by ot
82
82
 
83
83
  ```python
84
84
  # app1/management/commands/makemigrations.py
85
- from django_linear_migrations.management.commands.makemigrations import Command as LinearMigrationsMakeMigrationsCommand
85
+ from django_linear_migrations.management.commands.makemigrations import (
86
+ Command as LinearMigrationsMakeMigrationsCommand,
87
+ )
86
88
  from django_migrate_sql.management.commands.makemigrations import DjangoMigrateSQLMixin
87
89
 
90
+
88
91
  class Command(DjangoMigrateSQLMixin, LinearMigrationsMakeMigrationsCommand):
89
92
  pass
90
93
  ```
@@ -150,7 +153,7 @@ Note that
150
153
 
151
154
  sql_items = [
152
155
  SQLItem(
153
- 'make_sum', # name of the item
156
+ "make_sum", # name of the item
154
157
  """
155
158
  create or replace function make_sum(a int, b int) returns int as $$
156
159
  begin
@@ -158,7 +161,7 @@ Note that
158
161
  end;
159
162
  $$ language plpgsql;
160
163
  """, # forward sql
161
- reverse_sql='drop function make_sum(int, int);', # sql for removal
164
+ reverse_sql="drop function make_sum(int, int);", # sql for removal
162
165
  ),
163
166
  ]
164
167
  ```
@@ -180,13 +183,13 @@ Note that
180
183
 
181
184
  class Migration(migrations.Migration):
182
185
  dependencies = [
183
- ('app_name', '0001_initial'),
186
+ ("app_name", "0001_initial"),
184
187
  ]
185
188
  operations = [
186
189
  django_migrate_sql.operations.CreateSQL(
187
- name='make_sum',
188
- sql='create or replace function make_sum(a int, b int) returns int as $$ begin return a + b; end; $$ language plpgsql;',
189
- reverse_sql='drop function make_sum(int, int);',
190
+ name="make_sum",
191
+ sql="create or replace function make_sum(a int, b int) returns int as $$ begin return a + b; end; $$ language plpgsql;",
192
+ reverse_sql="drop function make_sum(int, int);",
190
193
  ),
191
194
  ]
192
195
  ```
@@ -266,27 +269,27 @@ Now, say, you want to change the function implementation so that it takes a cust
266
269
 
267
270
  class Migration(migrations.Migration):
268
271
  dependencies = [
269
- ('app_name', '0002_xxxx'),
272
+ ("app_name", "0002_xxxx"),
270
273
  ]
271
274
  operations = [
272
275
  django_migrate_sql.operations.ReverseAlterSQL(
273
- name='make_sum',
274
- sql='drop function make_sum(int, int);',
275
- reverse_sql='create or replace function make_sum(a int, b int) returns int as $$ begin return a + b; end; $$ language plpgsql;',
276
+ name="make_sum",
277
+ sql="drop function make_sum(int, int);",
278
+ reverse_sql="create or replace function make_sum(a int, b int) returns int as $$ begin return a + b; end; $$ language plpgsql;",
276
279
  ),
277
280
  django_migrate_sql.operations.CreateSQL(
278
- name='mynum',
279
- sql='create type mynum as (num int, name varchar(20));',
280
- reverse_sql='drop type mynum;',
281
+ name="mynum",
282
+ sql="create type mynum as (num int, name varchar(20));",
283
+ reverse_sql="drop type mynum;",
281
284
  ),
282
285
  django_migrate_sql.operations.AlterSQL(
283
- name='make_sum',
284
- sql='create or replace function make_sum(a mynum, b mynum) returns mynum as $$ begin return (a.num + b.num, \'result\')::mynum; end; $$ language plpgsql;',
285
- reverse_sql='drop function make_sum(mynum, mynum);',
286
+ name="make_sum",
287
+ sql="create or replace function make_sum(a mynum, b mynum) returns mynum as $$ begin return (a.num + b.num, 'result')::mynum; end; $$ language plpgsql;",
288
+ reverse_sql="drop function make_sum(mynum, mynum);",
286
289
  ),
287
290
  django_migrate_sql.operations.AlterSQLState(
288
- name='make_sum',
289
- add_dependencies=[('app_name', 'mynum')],
291
+ name="make_sum",
292
+ add_dependencies=[("app_name", "mynum")],
290
293
  ),
291
294
  ]
292
295
  ```
@@ -4,7 +4,7 @@ requires = [ "setuptools>=77.0.3" ]
4
4
 
5
5
  [project]
6
6
  name = "django-migrate-sql-deux"
7
- version = "2.0.0"
7
+ version = "3.0.0"
8
8
  description = "Django Migrations for raw SQL"
9
9
  readme = "README.md"
10
10
  license = "ISC"
@@ -12,7 +12,7 @@ authors = [
12
12
  { name = "Bogdan Klichuk", email = "klichukb@gmail.com" },
13
13
  { name = "Bruno Alla", email = "oss@browniebroke.com" },
14
14
  ]
15
- requires-python = ">=3.10"
15
+ requires-python = ">=3.11"
16
16
  classifiers = [
17
17
  "Development Status :: 5 - Production/Stable",
18
18
  "Intended Audience :: Developers",
@@ -22,11 +22,11 @@ classifiers = [
22
22
  "Framework :: Django :: 5.2",
23
23
  "Framework :: Django :: 6.0",
24
24
  "Framework :: Django :: 6.1",
25
- "Programming Language :: Python :: 3.10",
26
25
  "Programming Language :: Python :: 3.11",
27
26
  "Programming Language :: Python :: 3.12",
28
27
  "Programming Language :: Python :: 3.13",
29
28
  "Programming Language :: Python :: 3.14",
29
+ "Programming Language :: Python :: 3.15",
30
30
  "Topic :: Software Development :: Libraries",
31
31
  ]
32
32
 
@@ -39,8 +39,10 @@ urls.repository = "https://github.com/browniebroke/django-migrate-sql-deux"
39
39
 
40
40
  [dependency-groups]
41
41
  dev = [
42
- "psycopg2>=2.9.10,<2.10;python_version<'3.11'",
43
- "psycopg2>=2.9;python_version>='3.11'",
42
+ "django-stubs>=6.0.9",
43
+ "mypy>=2.3",
44
+ "psycopg[binary]>=3.2;python_version<'3.15'",
45
+ "psycopg>=3.2;python_version>='3.15'",
44
46
  "pytest>=9,<10",
45
47
  "pytest-django>=4.5,<5",
46
48
  "coverage",
@@ -52,9 +54,9 @@ django61 = [ "django>=6.1a1,<6.2; python_version>='3.12'" ]
52
54
  [tool.uv]
53
55
  conflicts = [
54
56
  [
55
- { group = "django61" },
56
- { group = "django60" },
57
57
  { group = "django52" },
58
+ { group = "django60" },
59
+ { group = "django61" },
58
60
  ],
59
61
  ]
60
62
 
@@ -101,7 +103,7 @@ lint.per-file-ignores."tests/**/migrations*/*" = [
101
103
  lint.isort.known-first-party = [ "django_migrate_sql", "tests" ]
102
104
 
103
105
  [tool.pyproject-fmt]
104
- max_supported_python = "3.14"
106
+ max_supported_python = "3.15"
105
107
 
106
108
  [tool.pytest.ini_options]
107
109
  addopts = """\
@@ -143,13 +145,11 @@ no_implicit_optional = true
143
145
  show_error_codes = true
144
146
  warn_unreachable = true
145
147
  warn_unused_ignores = true
146
- exclude = [
147
- 'setup.py',
148
- ]
148
+ plugins = [ "mypy_django_plugin.main" ]
149
+ overrides = [ { module = "tests.*", allow_untyped_defs = true }, { module = "docs.*", ignore_errors = true } ]
149
150
 
150
- [[tool.mypy.overrides]]
151
- module = "tests.*"
152
- allow_untyped_defs = true
151
+ [tool.django-stubs]
152
+ django_settings_module = "tests.settings"
153
153
 
154
154
  [tool.semantic_release]
155
155
  version_toml = [ "pyproject.toml:project.version" ]
@@ -0,0 +1 @@
1
+ __version__ = "3.0.0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: django-migrate-sql-deux
3
- Version: 2.0.0
3
+ Version: 3.0.0
4
4
  Summary: Django Migrations for raw SQL
5
5
  Author-email: Bogdan Klichuk <klichukb@gmail.com>, Bruno Alla <oss@browniebroke.com>
6
6
  License-Expression: ISC
@@ -15,13 +15,13 @@ Classifier: Framework :: Django
15
15
  Classifier: Framework :: Django :: 5.2
16
16
  Classifier: Framework :: Django :: 6.0
17
17
  Classifier: Framework :: Django :: 6.1
18
- Classifier: Programming Language :: Python :: 3.10
19
18
  Classifier: Programming Language :: Python :: 3.11
20
19
  Classifier: Programming Language :: Python :: 3.12
21
20
  Classifier: Programming Language :: Python :: 3.13
22
21
  Classifier: Programming Language :: Python :: 3.14
22
+ Classifier: Programming Language :: Python :: 3.15
23
23
  Classifier: Topic :: Software Development :: Libraries
24
- Requires-Python: >=3.10
24
+ Requires-Python: >=3.11
25
25
  Description-Content-Type: text/markdown
26
26
  License-File: LICENSE
27
27
  Requires-Dist: django>=5.2
@@ -99,7 +99,7 @@ Add `django_migrate_sql` to `INSTALLED_APPS`:
99
99
  ```python
100
100
  INSTALLED_APPS = [
101
101
  # ...
102
- 'django_migrate_sql',
102
+ "django_migrate_sql",
103
103
  ]
104
104
  ```
105
105
 
@@ -111,9 +111,12 @@ If you want functionality from multiple `makemigrations` commands provided by ot
111
111
 
112
112
  ```python
113
113
  # app1/management/commands/makemigrations.py
114
- from django_linear_migrations.management.commands.makemigrations import Command as LinearMigrationsMakeMigrationsCommand
114
+ from django_linear_migrations.management.commands.makemigrations import (
115
+ Command as LinearMigrationsMakeMigrationsCommand,
116
+ )
115
117
  from django_migrate_sql.management.commands.makemigrations import DjangoMigrateSQLMixin
116
118
 
119
+
117
120
  class Command(DjangoMigrateSQLMixin, LinearMigrationsMakeMigrationsCommand):
118
121
  pass
119
122
  ```
@@ -179,7 +182,7 @@ Note that
179
182
 
180
183
  sql_items = [
181
184
  SQLItem(
182
- 'make_sum', # name of the item
185
+ "make_sum", # name of the item
183
186
  """
184
187
  create or replace function make_sum(a int, b int) returns int as $$
185
188
  begin
@@ -187,7 +190,7 @@ Note that
187
190
  end;
188
191
  $$ language plpgsql;
189
192
  """, # forward sql
190
- reverse_sql='drop function make_sum(int, int);', # sql for removal
193
+ reverse_sql="drop function make_sum(int, int);", # sql for removal
191
194
  ),
192
195
  ]
193
196
  ```
@@ -209,13 +212,13 @@ Note that
209
212
 
210
213
  class Migration(migrations.Migration):
211
214
  dependencies = [
212
- ('app_name', '0001_initial'),
215
+ ("app_name", "0001_initial"),
213
216
  ]
214
217
  operations = [
215
218
  django_migrate_sql.operations.CreateSQL(
216
- name='make_sum',
217
- sql='create or replace function make_sum(a int, b int) returns int as $$ begin return a + b; end; $$ language plpgsql;',
218
- reverse_sql='drop function make_sum(int, int);',
219
+ name="make_sum",
220
+ sql="create or replace function make_sum(a int, b int) returns int as $$ begin return a + b; end; $$ language plpgsql;",
221
+ reverse_sql="drop function make_sum(int, int);",
219
222
  ),
220
223
  ]
221
224
  ```
@@ -295,27 +298,27 @@ Now, say, you want to change the function implementation so that it takes a cust
295
298
 
296
299
  class Migration(migrations.Migration):
297
300
  dependencies = [
298
- ('app_name', '0002_xxxx'),
301
+ ("app_name", "0002_xxxx"),
299
302
  ]
300
303
  operations = [
301
304
  django_migrate_sql.operations.ReverseAlterSQL(
302
- name='make_sum',
303
- sql='drop function make_sum(int, int);',
304
- reverse_sql='create or replace function make_sum(a int, b int) returns int as $$ begin return a + b; end; $$ language plpgsql;',
305
+ name="make_sum",
306
+ sql="drop function make_sum(int, int);",
307
+ reverse_sql="create or replace function make_sum(a int, b int) returns int as $$ begin return a + b; end; $$ language plpgsql;",
305
308
  ),
306
309
  django_migrate_sql.operations.CreateSQL(
307
- name='mynum',
308
- sql='create type mynum as (num int, name varchar(20));',
309
- reverse_sql='drop type mynum;',
310
+ name="mynum",
311
+ sql="create type mynum as (num int, name varchar(20));",
312
+ reverse_sql="drop type mynum;",
310
313
  ),
311
314
  django_migrate_sql.operations.AlterSQL(
312
- name='make_sum',
313
- sql='create or replace function make_sum(a mynum, b mynum) returns mynum as $$ begin return (a.num + b.num, \'result\')::mynum; end; $$ language plpgsql;',
314
- reverse_sql='drop function make_sum(mynum, mynum);',
315
+ name="make_sum",
316
+ sql="create or replace function make_sum(a mynum, b mynum) returns mynum as $$ begin return (a.num + b.num, 'result')::mynum; end; $$ language plpgsql;",
317
+ reverse_sql="drop function make_sum(mynum, mynum);",
315
318
  ),
316
319
  django_migrate_sql.operations.AlterSQLState(
317
- name='make_sum',
318
- add_dependencies=[('app_name', 'mynum')],
320
+ name="make_sum",
321
+ add_dependencies=[("app_name", "mynum")],
319
322
  ),
320
323
  ]
321
324
  ```
@@ -1 +0,0 @@
1
- __version__ = "2.0.0"