welearn-database 1.1.1.dev0__tar.gz → 1.2.0.dev0__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.
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/PKG-INFO +1 -1
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/pyproject.toml +1 -1
- welearn_database-1.2.0.dev0/welearn_database/alembic/versions/068312e7800c_add_referrer_origin_column_to_user_and_.py +45 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/data/models/document_related.py +2 -2
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/data/models/grafana.py +5 -1
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/data/models/user_related.py +2 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/LICENSE +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/README.md +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/__init__.py +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/alembic/README +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/alembic/env.py +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/alembic/script.py.mako +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/alembic/versions/0e0bc0fca384_doc_qty_per_source.py +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/alembic/versions/16ff997426d3_remove_error_retrieval_unique_constraint.py +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/alembic/versions/4c7161819e5a_grafana_views.py +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/alembic/versions/4f5a188dd614_add_main_url_column.py +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/alembic/versions/4fcbfb7f3145_added_api_key_management_table.py +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/alembic/versions/5d82613c9aca_context_document.py +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/alembic/versions/821173cf9c5d_initial_migration.py +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/alembic/versions/84c42739c17b_create_table_errordataquality.py +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/alembic/versions/89920abb7ff8_add_category.py +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/alembic/versions/96bba9e4842a_merge_external_id_error_quality.py +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/alembic/versions/a50a1db3ca2a_add_used_since_column_for_embeddings.py +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/alembic/versions/b031206324b7_agent_related.py +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/alembic/versions/ccdbd708c997_create_column_external_id.py +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/alembic/versions/e354666f951d_inferred_user.py +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/data/__init__.py +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/data/enumeration.py +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/data/models/__init__.py +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/data/models/agent_related.py +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/data/models/corpus_related.py +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/database_utils.py +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/exceptions.py +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/modules/__init__.py +0 -0
- {welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/modules/text_cleaning.py +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""add referrer origin column to user and session
|
|
2
|
+
|
|
3
|
+
Revision ID: 068312e7800c
|
|
4
|
+
Revises: 4f5a188dd614
|
|
5
|
+
Create Date: 2026-01-12 11:45:40.359740
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from typing import Sequence, Union
|
|
10
|
+
|
|
11
|
+
from alembic import op
|
|
12
|
+
import sqlalchemy as sa
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# revision identifiers, used by Alembic.
|
|
16
|
+
revision: str = "068312e7800c"
|
|
17
|
+
down_revision: Union[str, None] = "4f5a188dd614"
|
|
18
|
+
branch_labels: Union[str, Sequence[str], None] = None
|
|
19
|
+
depends_on: Union[str, Sequence[str], None] = None
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def upgrade() -> None:
|
|
23
|
+
op.add_column(
|
|
24
|
+
"session",
|
|
25
|
+
sa.Column("origin_referrer", sa.String(), nullable=True),
|
|
26
|
+
schema="user_related",
|
|
27
|
+
)
|
|
28
|
+
op.add_column(
|
|
29
|
+
"inferred_user",
|
|
30
|
+
sa.Column("origin_referrer", sa.String(), nullable=True),
|
|
31
|
+
schema="user_related",
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def downgrade() -> None:
|
|
36
|
+
op.drop_column(
|
|
37
|
+
"inferred_user",
|
|
38
|
+
"origin_referrer",
|
|
39
|
+
schema="user_related",
|
|
40
|
+
)
|
|
41
|
+
op.drop_column(
|
|
42
|
+
"session",
|
|
43
|
+
"origin_referrer",
|
|
44
|
+
schema="user_related",
|
|
45
|
+
)
|
|
@@ -475,7 +475,7 @@ class QtyDocumentInQdrantPerCorpus(Base):
|
|
|
475
475
|
__read_only__ = True
|
|
476
476
|
|
|
477
477
|
source_name: Mapped[str] = mapped_column(primary_key=True)
|
|
478
|
-
count: Mapped[int]
|
|
478
|
+
count: Mapped[int]
|
|
479
479
|
|
|
480
480
|
|
|
481
481
|
class QtyDocumentPerCorpus(Base):
|
|
@@ -484,4 +484,4 @@ class QtyDocumentPerCorpus(Base):
|
|
|
484
484
|
__read_only__ = True
|
|
485
485
|
|
|
486
486
|
source_name: Mapped[str] = mapped_column(primary_key=True)
|
|
487
|
-
count: Mapped[int]
|
|
487
|
+
count: Mapped[int]
|
{welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/data/models/grafana.py
RENAMED
|
@@ -21,6 +21,7 @@ class Corpus(Base):
|
|
|
21
21
|
is_fix: Mapped[bool | None] = mapped_column(nullable=True)
|
|
22
22
|
binary_treshold: Mapped[float | None] = mapped_column(nullable=True)
|
|
23
23
|
|
|
24
|
+
|
|
24
25
|
class DocumentLatestState(Base):
|
|
25
26
|
__tablename__ = "document_latest_state"
|
|
26
27
|
__table_args__ = {"schema": schema_name}
|
|
@@ -93,6 +94,7 @@ class ProcessState(Base):
|
|
|
93
94
|
created_at: Mapped[datetime] = mapped_column()
|
|
94
95
|
operation_order: Mapped[int] = mapped_column()
|
|
95
96
|
|
|
97
|
+
|
|
96
98
|
class QtyEndpointsPerUser(Base):
|
|
97
99
|
__tablename__ = "qty_endpoints_per_user"
|
|
98
100
|
__table_args__ = {"schema": schema_name}
|
|
@@ -106,7 +108,9 @@ class QtySessionEndpointPerUser(Base):
|
|
|
106
108
|
__table_args__ = {"schema": schema_name}
|
|
107
109
|
__read_only__ = True
|
|
108
110
|
|
|
109
|
-
inferred_user_id: Mapped[uuid.UUID] = mapped_column(
|
|
111
|
+
inferred_user_id: Mapped[uuid.UUID] = mapped_column(
|
|
112
|
+
UUID(as_uuid=True), primary_key=True
|
|
113
|
+
)
|
|
110
114
|
host: Mapped[str] = mapped_column(primary_key=True)
|
|
111
115
|
count_sessions: Mapped[int] = mapped_column()
|
|
112
116
|
count_endpoints: Mapped[int] = mapped_column()
|
|
@@ -169,6 +169,7 @@ class Session(Base):
|
|
|
169
169
|
ForeignKey("user_related.inferred_user.id"),
|
|
170
170
|
nullable=False,
|
|
171
171
|
)
|
|
172
|
+
origin_referrer: Mapped[str | None]
|
|
172
173
|
created_at: Mapped[datetime] = mapped_column(
|
|
173
174
|
TIMESTAMP(timezone=False),
|
|
174
175
|
nullable=False,
|
|
@@ -186,6 +187,7 @@ class InferredUser(Base):
|
|
|
186
187
|
id: Mapped[UUID] = mapped_column(
|
|
187
188
|
types.Uuid, primary_key=True, nullable=False, server_default="gen_random_uuid()"
|
|
188
189
|
)
|
|
190
|
+
origin_referrer: Mapped[str | None]
|
|
189
191
|
created_at: Mapped[datetime] = mapped_column(
|
|
190
192
|
TIMESTAMP(timezone=False),
|
|
191
193
|
nullable=False,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/alembic/script.py.mako
RENAMED
|
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
|
{welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/data/__init__.py
RENAMED
|
File without changes
|
{welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/data/enumeration.py
RENAMED
|
File without changes
|
{welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/data/models/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/database_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
{welearn_database-1.1.1.dev0 → welearn_database-1.2.0.dev0}/welearn_database/modules/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|