postgresdb3 1.0.0__tar.gz → 1.0.2__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.
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/PKG-INFO +6 -2
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/README.md +5 -1
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/postgresdb3/migrations/engine.py +3 -2
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/postgresdb3.egg-info/PKG-INFO +6 -2
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/setup.py +1 -1
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/postgresdb3/__init__.py +0 -0
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/postgresdb3/cli.py +0 -0
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/postgresdb3/core/__init__.py +0 -0
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/postgresdb3/core/async_db.py +0 -0
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/postgresdb3/core/sync_db.py +0 -0
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/postgresdb3/migrations/__init__.py +0 -0
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/postgresdb3/orm/__init__.py +0 -0
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/postgresdb3/orm/base.py +0 -0
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/postgresdb3/orm/expressions.py +0 -0
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/postgresdb3/orm/fields/__init__.py +0 -0
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/postgresdb3/orm/fields/base.py +0 -0
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/postgresdb3/orm/fields/datetime.py +0 -0
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/postgresdb3/orm/fields/foreign.py +0 -0
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/postgresdb3/orm/fields/misc.py +0 -0
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/postgresdb3/orm/fields/numeric.py +0 -0
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/postgresdb3/orm/fields/text.py +0 -0
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/postgresdb3/orm/meta.py +0 -0
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/postgresdb3/orm/models.py +0 -0
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/postgresdb3/orm/query.py +0 -0
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/postgresdb3/orm/relations.py +0 -0
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/postgresdb3.egg-info/SOURCES.txt +0 -0
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/postgresdb3.egg-info/dependency_links.txt +0 -0
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/postgresdb3.egg-info/requires.txt +0 -0
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/postgresdb3.egg-info/top_level.txt +0 -0
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/pyproject.toml +0 -0
- {postgresdb3-1.0.0 → postgresdb3-1.0.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: postgresdb3
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: High-Performance Sync and Async PostgreSQL ORM for Python
|
|
5
5
|
Author: Abdulbosit Alijonov
|
|
6
6
|
Project-URL: Source Code, https://github.com/AlijonovUz/PostgresDB
|
|
@@ -145,7 +145,11 @@ Siz o'z loyihangiz papkasida bitta `manage.py` yaratib olib, jadvallarni SQL o'q
|
|
|
145
145
|
```python
|
|
146
146
|
import sys
|
|
147
147
|
from postgresdb3 import execute_from_command_line
|
|
148
|
-
from myapp.models import db_sync # Sizning bazaga ulangan db obyektingiz
|
|
148
|
+
from myapp.models import db_sync # 1. Sizning bazaga ulangan db obyektingiz
|
|
149
|
+
|
|
150
|
+
# 2. DIQQAT: Migratsiya dvigateli modellarni ko'rishi uchun
|
|
151
|
+
# ularni albatta import qilib qo'yishingiz SHART!
|
|
152
|
+
from myapp.models import User, Post, Tag
|
|
149
153
|
|
|
150
154
|
if __name__ == "__main__":
|
|
151
155
|
execute_from_command_line(db_sync, sys.argv)
|
|
@@ -123,7 +123,11 @@ Siz o'z loyihangiz papkasida bitta `manage.py` yaratib olib, jadvallarni SQL o'q
|
|
|
123
123
|
```python
|
|
124
124
|
import sys
|
|
125
125
|
from postgresdb3 import execute_from_command_line
|
|
126
|
-
from myapp.models import db_sync # Sizning bazaga ulangan db obyektingiz
|
|
126
|
+
from myapp.models import db_sync # 1. Sizning bazaga ulangan db obyektingiz
|
|
127
|
+
|
|
128
|
+
# 2. DIQQAT: Migratsiya dvigateli modellarni ko'rishi uchun
|
|
129
|
+
# ularni albatta import qilib qo'yishingiz SHART!
|
|
130
|
+
from myapp.models import User, Post, Tag
|
|
127
131
|
|
|
128
132
|
if __name__ == "__main__":
|
|
129
133
|
execute_from_command_line(db_sync, sys.argv)
|
|
@@ -22,9 +22,10 @@ class MigrationEngine:
|
|
|
22
22
|
if getattr(field, "primary_key", False):
|
|
23
23
|
fields[field_name] += " PRIMARY KEY"
|
|
24
24
|
|
|
25
|
-
|
|
26
25
|
if not any(getattr(f, "primary_key", False) for f in model._fields.values()):
|
|
27
|
-
|
|
26
|
+
ordered_fields = {model.get_pk_name(): "SERIAL PRIMARY KEY"}
|
|
27
|
+
ordered_fields.update(fields)
|
|
28
|
+
fields = ordered_fields
|
|
28
29
|
|
|
29
30
|
meta_options = getattr(model, "_meta_options", {})
|
|
30
31
|
state[table_name] = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: postgresdb3
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: High-Performance Sync and Async PostgreSQL ORM for Python
|
|
5
5
|
Author: Abdulbosit Alijonov
|
|
6
6
|
Project-URL: Source Code, https://github.com/AlijonovUz/PostgresDB
|
|
@@ -145,7 +145,11 @@ Siz o'z loyihangiz papkasida bitta `manage.py` yaratib olib, jadvallarni SQL o'q
|
|
|
145
145
|
```python
|
|
146
146
|
import sys
|
|
147
147
|
from postgresdb3 import execute_from_command_line
|
|
148
|
-
from myapp.models import db_sync # Sizning bazaga ulangan db obyektingiz
|
|
148
|
+
from myapp.models import db_sync # 1. Sizning bazaga ulangan db obyektingiz
|
|
149
|
+
|
|
150
|
+
# 2. DIQQAT: Migratsiya dvigateli modellarni ko'rishi uchun
|
|
151
|
+
# ularni albatta import qilib qo'yishingiz SHART!
|
|
152
|
+
from myapp.models import User, Post, Tag
|
|
149
153
|
|
|
150
154
|
if __name__ == "__main__":
|
|
151
155
|
execute_from_command_line(db_sync, sys.argv)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|