django-migrate-sql-deux 2.1.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.1.0 → django_migrate_sql_deux-3.0.0}/PKG-INFO +25 -23
  2. {django_migrate_sql_deux-2.1.0 → django_migrate_sql_deux-3.0.0}/README.md +23 -20
  3. {django_migrate_sql_deux-2.1.0 → django_migrate_sql_deux-3.0.0}/pyproject.toml +10 -11
  4. django_migrate_sql_deux-3.0.0/src/django_migrate_sql/__init__.py +1 -0
  5. {django_migrate_sql_deux-2.1.0 → django_migrate_sql_deux-3.0.0}/src/django_migrate_sql_deux.egg-info/PKG-INFO +25 -23
  6. django_migrate_sql_deux-2.1.0/src/django_migrate_sql/__init__.py +0 -1
  7. {django_migrate_sql_deux-2.1.0 → django_migrate_sql_deux-3.0.0}/LICENSE +0 -0
  8. {django_migrate_sql_deux-2.1.0 → django_migrate_sql_deux-3.0.0}/setup.cfg +0 -0
  9. {django_migrate_sql_deux-2.1.0 → django_migrate_sql_deux-3.0.0}/src/django_migrate_sql/autodetector.py +0 -0
  10. {django_migrate_sql_deux-2.1.0 → django_migrate_sql_deux-3.0.0}/src/django_migrate_sql/config.py +0 -0
  11. {django_migrate_sql_deux-2.1.0 → django_migrate_sql_deux-3.0.0}/src/django_migrate_sql/graph.py +0 -0
  12. {django_migrate_sql_deux-2.1.0 → django_migrate_sql_deux-3.0.0}/src/django_migrate_sql/management/__init__.py +0 -0
  13. {django_migrate_sql_deux-2.1.0 → django_migrate_sql_deux-3.0.0}/src/django_migrate_sql/management/commands/__init__.py +0 -0
  14. {django_migrate_sql_deux-2.1.0 → django_migrate_sql_deux-3.0.0}/src/django_migrate_sql/management/commands/makemigrations.py +0 -0
  15. {django_migrate_sql_deux-2.1.0 → django_migrate_sql_deux-3.0.0}/src/django_migrate_sql/management/commands/migrate.py +0 -0
  16. {django_migrate_sql_deux-2.1.0 → django_migrate_sql_deux-3.0.0}/src/django_migrate_sql/operations.py +0 -0
  17. {django_migrate_sql_deux-2.1.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.1.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.1.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.1.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.1.0 → django_migrate_sql_deux-3.0.0}/tests/test_config.py +0 -0
  22. {django_migrate_sql_deux-2.1.0 → django_migrate_sql_deux-3.0.0}/tests/test_migrate_command.py +0 -0
  23. {django_migrate_sql_deux-2.1.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.1.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,14 +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
23
22
  Classifier: Programming Language :: Python :: 3.15
24
23
  Classifier: Topic :: Software Development :: Libraries
25
- Requires-Python: >=3.10
24
+ Requires-Python: >=3.11
26
25
  Description-Content-Type: text/markdown
27
26
  License-File: LICENSE
28
27
  Requires-Dist: django>=5.2
@@ -100,7 +99,7 @@ Add `django_migrate_sql` to `INSTALLED_APPS`:
100
99
  ```python
101
100
  INSTALLED_APPS = [
102
101
  # ...
103
- 'django_migrate_sql',
102
+ "django_migrate_sql",
104
103
  ]
105
104
  ```
106
105
 
@@ -112,9 +111,12 @@ If you want functionality from multiple `makemigrations` commands provided by ot
112
111
 
113
112
  ```python
114
113
  # app1/management/commands/makemigrations.py
115
- 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
+ )
116
117
  from django_migrate_sql.management.commands.makemigrations import DjangoMigrateSQLMixin
117
118
 
119
+
118
120
  class Command(DjangoMigrateSQLMixin, LinearMigrationsMakeMigrationsCommand):
119
121
  pass
120
122
  ```
@@ -180,7 +182,7 @@ Note that
180
182
 
181
183
  sql_items = [
182
184
  SQLItem(
183
- 'make_sum', # name of the item
185
+ "make_sum", # name of the item
184
186
  """
185
187
  create or replace function make_sum(a int, b int) returns int as $$
186
188
  begin
@@ -188,7 +190,7 @@ Note that
188
190
  end;
189
191
  $$ language plpgsql;
190
192
  """, # forward sql
191
- reverse_sql='drop function make_sum(int, int);', # sql for removal
193
+ reverse_sql="drop function make_sum(int, int);", # sql for removal
192
194
  ),
193
195
  ]
194
196
  ```
@@ -210,13 +212,13 @@ Note that
210
212
 
211
213
  class Migration(migrations.Migration):
212
214
  dependencies = [
213
- ('app_name', '0001_initial'),
215
+ ("app_name", "0001_initial"),
214
216
  ]
215
217
  operations = [
216
218
  django_migrate_sql.operations.CreateSQL(
217
- name='make_sum',
218
- sql='create or replace function make_sum(a int, b int) returns int as $$ begin return a + b; end; $$ language plpgsql;',
219
- 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);",
220
222
  ),
221
223
  ]
222
224
  ```
@@ -296,27 +298,27 @@ Now, say, you want to change the function implementation so that it takes a cust
296
298
 
297
299
  class Migration(migrations.Migration):
298
300
  dependencies = [
299
- ('app_name', '0002_xxxx'),
301
+ ("app_name", "0002_xxxx"),
300
302
  ]
301
303
  operations = [
302
304
  django_migrate_sql.operations.ReverseAlterSQL(
303
- name='make_sum',
304
- sql='drop function make_sum(int, int);',
305
- 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;",
306
308
  ),
307
309
  django_migrate_sql.operations.CreateSQL(
308
- name='mynum',
309
- sql='create type mynum as (num int, name varchar(20));',
310
- 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;",
311
313
  ),
312
314
  django_migrate_sql.operations.AlterSQL(
313
- name='make_sum',
314
- 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;',
315
- 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);",
316
318
  ),
317
319
  django_migrate_sql.operations.AlterSQLState(
318
- name='make_sum',
319
- add_dependencies=[('app_name', 'mynum')],
320
+ name="make_sum",
321
+ add_dependencies=[("app_name", "mynum")],
320
322
  ),
321
323
  ]
322
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.1.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,7 +22,6 @@ 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",
@@ -40,8 +39,10 @@ urls.repository = "https://github.com/browniebroke/django-migrate-sql-deux"
40
39
 
41
40
  [dependency-groups]
42
41
  dev = [
43
- "psycopg2>=2.9.10,<2.10;python_version<'3.11'",
44
- "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'",
45
46
  "pytest>=9,<10",
46
47
  "pytest-django>=4.5,<5",
47
48
  "coverage",
@@ -144,13 +145,11 @@ no_implicit_optional = true
144
145
  show_error_codes = true
145
146
  warn_unreachable = true
146
147
  warn_unused_ignores = true
147
- exclude = [
148
- 'setup.py',
149
- ]
148
+ plugins = [ "mypy_django_plugin.main" ]
149
+ overrides = [ { module = "tests.*", allow_untyped_defs = true }, { module = "docs.*", ignore_errors = true } ]
150
150
 
151
- [[tool.mypy.overrides]]
152
- module = "tests.*"
153
- allow_untyped_defs = true
151
+ [tool.django-stubs]
152
+ django_settings_module = "tests.settings"
154
153
 
155
154
  [tool.semantic_release]
156
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.1.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,14 +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
23
22
  Classifier: Programming Language :: Python :: 3.15
24
23
  Classifier: Topic :: Software Development :: Libraries
25
- Requires-Python: >=3.10
24
+ Requires-Python: >=3.11
26
25
  Description-Content-Type: text/markdown
27
26
  License-File: LICENSE
28
27
  Requires-Dist: django>=5.2
@@ -100,7 +99,7 @@ Add `django_migrate_sql` to `INSTALLED_APPS`:
100
99
  ```python
101
100
  INSTALLED_APPS = [
102
101
  # ...
103
- 'django_migrate_sql',
102
+ "django_migrate_sql",
104
103
  ]
105
104
  ```
106
105
 
@@ -112,9 +111,12 @@ If you want functionality from multiple `makemigrations` commands provided by ot
112
111
 
113
112
  ```python
114
113
  # app1/management/commands/makemigrations.py
115
- 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
+ )
116
117
  from django_migrate_sql.management.commands.makemigrations import DjangoMigrateSQLMixin
117
118
 
119
+
118
120
  class Command(DjangoMigrateSQLMixin, LinearMigrationsMakeMigrationsCommand):
119
121
  pass
120
122
  ```
@@ -180,7 +182,7 @@ Note that
180
182
 
181
183
  sql_items = [
182
184
  SQLItem(
183
- 'make_sum', # name of the item
185
+ "make_sum", # name of the item
184
186
  """
185
187
  create or replace function make_sum(a int, b int) returns int as $$
186
188
  begin
@@ -188,7 +190,7 @@ Note that
188
190
  end;
189
191
  $$ language plpgsql;
190
192
  """, # forward sql
191
- reverse_sql='drop function make_sum(int, int);', # sql for removal
193
+ reverse_sql="drop function make_sum(int, int);", # sql for removal
192
194
  ),
193
195
  ]
194
196
  ```
@@ -210,13 +212,13 @@ Note that
210
212
 
211
213
  class Migration(migrations.Migration):
212
214
  dependencies = [
213
- ('app_name', '0001_initial'),
215
+ ("app_name", "0001_initial"),
214
216
  ]
215
217
  operations = [
216
218
  django_migrate_sql.operations.CreateSQL(
217
- name='make_sum',
218
- sql='create or replace function make_sum(a int, b int) returns int as $$ begin return a + b; end; $$ language plpgsql;',
219
- 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);",
220
222
  ),
221
223
  ]
222
224
  ```
@@ -296,27 +298,27 @@ Now, say, you want to change the function implementation so that it takes a cust
296
298
 
297
299
  class Migration(migrations.Migration):
298
300
  dependencies = [
299
- ('app_name', '0002_xxxx'),
301
+ ("app_name", "0002_xxxx"),
300
302
  ]
301
303
  operations = [
302
304
  django_migrate_sql.operations.ReverseAlterSQL(
303
- name='make_sum',
304
- sql='drop function make_sum(int, int);',
305
- 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;",
306
308
  ),
307
309
  django_migrate_sql.operations.CreateSQL(
308
- name='mynum',
309
- sql='create type mynum as (num int, name varchar(20));',
310
- 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;",
311
313
  ),
312
314
  django_migrate_sql.operations.AlterSQL(
313
- name='make_sum',
314
- 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;',
315
- 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);",
316
318
  ),
317
319
  django_migrate_sql.operations.AlterSQLState(
318
- name='make_sum',
319
- add_dependencies=[('app_name', 'mynum')],
320
+ name="make_sum",
321
+ add_dependencies=[("app_name", "mynum")],
320
322
  ),
321
323
  ]
322
324
  ```
@@ -1 +0,0 @@
1
- __version__ = "2.1.0"