welearn-database 1.5.6.dev1__tar.gz → 1.5.7.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.5.6.dev1 → welearn_database-1.5.7.dev0}/PKG-INFO +1 -1
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/pyproject.toml +1 -1
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/env.py +12 -2
- welearn_database-1.5.7.dev0/welearn_database/alembic/versions/1_5_7_add_feature_thread_and_guest_feature_usage_tables.py +113 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/data/models/user_related.py +137 -1
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/LICENSE +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/README.md +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/__init__.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/README +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/script.py.mako +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/0310ff0bda4f_track_document_last_state.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/068312e7800c_add_referrer_origin_column_to_user_and_.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/0e0bc0fca384_doc_qty_per_source.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/16ff997426d3_remove_error_retrieval_unique_constraint.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/1_5_5_analytical_view_for_research.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/1_5_6_add_is_hidden_column_to_category.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/2ad4895b2674_data_collection.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/4c7161819e5a_grafana_views.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/4f5a188dd614_add_main_url_column.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/4fcbfb7f3145_added_api_key_management_table.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/5aad97149044_add_histo_table_for_materialized_views.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/5d46d7920342_support_sub_corpus.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/5d82613c9aca_context_document.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/6d4346fad6f4_view_used_feature_per_session.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/821173cf9c5d_initial_migration.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/84c42739c17b_create_table_errordataquality.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/89920abb7ff8_add_category.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/8b780aea403a_add_university_data.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/95ffe7afa64c_add_index_idx_welearn_document_keyword_.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/96bba9e4842a_merge_external_id_error_quality.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/9b4f1da0c1f2_data_collection_for_focus_group.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/a50a1db3ca2a_add_used_since_column_for_embeddings.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/b031206324b7_agent_related.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/b049924f7067_modify_corpus_name_embedding_model_lang_.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/b84462ca3800_update_grafana_process_state_view.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/ccdbd708c997_create_column_external_id.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/d22d6324c256_cleaned_document_state.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/d990f127902f_merge_keycloack_and_new_cleaned_state_.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/e354666f951d_inferred_user.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/f10903998081_keycloack_id_for_user_id.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/f1ce0ad2845b_add_doi_column_to_document.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/f5e91a5c950d_add_analytic_form.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/alembic/versions/f8602200fa99_update_session_view.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/data/__init__.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/data/details_dict.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/data/enumeration.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/data/models/__init__.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/data/models/agent_related.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/data/models/corpus_related.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/data/models/document_related.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/data/models/grafana.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/database_utils.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/exceptions.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/modules/__init__.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/modules/text_cleaning.py +0 -0
- {welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/regular_expression.py +0 -0
|
@@ -3,6 +3,7 @@ from logging.config import fileConfig
|
|
|
3
3
|
|
|
4
4
|
from alembic import context
|
|
5
5
|
from dotenv import load_dotenv
|
|
6
|
+
from sqlalchemy import URL
|
|
6
7
|
|
|
7
8
|
from welearn_database.database_utils import create_sqlalchemy_engine
|
|
8
9
|
|
|
@@ -45,9 +46,18 @@ def run_migrations_offline() -> None:
|
|
|
45
46
|
script output.
|
|
46
47
|
|
|
47
48
|
"""
|
|
48
|
-
|
|
49
|
+
load_dotenv()
|
|
50
|
+
|
|
51
|
+
db_url = URL.create(
|
|
52
|
+
drivername=os.getenv("PG_DRIVER", "postgresql+psycopg"),
|
|
53
|
+
username=os.environ["PG_USER"],
|
|
54
|
+
password=os.environ["PG_PASSWORD"],
|
|
55
|
+
host=os.getenv("PG_HOST", "localhost"),
|
|
56
|
+
port=int(os.getenv("PG_PORT", "5432")),
|
|
57
|
+
database=os.environ["PG_DB"],
|
|
58
|
+
)
|
|
49
59
|
context.configure(
|
|
50
|
-
url=
|
|
60
|
+
url=db_url.render_as_string(hide_password=False),
|
|
51
61
|
target_metadata=target_metadata,
|
|
52
62
|
literal_binds=True,
|
|
53
63
|
dialect_opts={"paramstyle": "named"},
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"""add feature, thread and guest_feature_usage tables
|
|
2
|
+
|
|
3
|
+
Revision ID: 1_5_7
|
|
4
|
+
Revises: 1_5_6
|
|
5
|
+
Create Date: 2026-11-18 16:00:00.000000
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
from typing import Sequence, Union
|
|
9
|
+
|
|
10
|
+
from alembic import op
|
|
11
|
+
import sqlalchemy as sa
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# revision identifiers, used by Alembic.
|
|
15
|
+
revision: str = '1_5_7'
|
|
16
|
+
down_revision: Union[str, None] = '1_5_6'
|
|
17
|
+
branch_labels: Union[str, Sequence[str], None] = None
|
|
18
|
+
depends_on: Union[str, Sequence[str], None] = None
|
|
19
|
+
|
|
20
|
+
SCHEMA = "user_related"
|
|
21
|
+
|
|
22
|
+
# created here so every environment has the same rows; code finds them by title
|
|
23
|
+
FEATURE_TITLES = ["chat", "microlearning", "syllabus"]
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def upgrade() -> None:
|
|
27
|
+
feature = op.create_table(
|
|
28
|
+
"feature",
|
|
29
|
+
sa.Column("id", sa.Uuid(), server_default=sa.text("gen_random_uuid()"), nullable=False),
|
|
30
|
+
sa.Column("title", sa.String(), nullable=False),
|
|
31
|
+
sa.Column("created_at", sa.TIMESTAMP(), server_default=sa.text("NOW()"), nullable=False),
|
|
32
|
+
sa.PrimaryKeyConstraint("id"),
|
|
33
|
+
sa.UniqueConstraint("title", name="feature_title_key"),
|
|
34
|
+
schema=SCHEMA,
|
|
35
|
+
)
|
|
36
|
+
op.bulk_insert(feature, [{"title": title} for title in FEATURE_TITLES])
|
|
37
|
+
|
|
38
|
+
op.create_table(
|
|
39
|
+
"thread",
|
|
40
|
+
sa.Column("id", sa.Uuid(), server_default=sa.text("gen_random_uuid()"), nullable=False),
|
|
41
|
+
sa.Column("inferred_user_id", sa.Uuid(), nullable=False),
|
|
42
|
+
sa.Column("feature_id", sa.Uuid(), nullable=False),
|
|
43
|
+
sa.Column("title", sa.String(), nullable=True),
|
|
44
|
+
sa.Column("current_step", sa.Integer(), nullable=True),
|
|
45
|
+
sa.Column("max_step", sa.Integer(), nullable=True),
|
|
46
|
+
sa.Column(
|
|
47
|
+
"is_finished",
|
|
48
|
+
sa.Boolean(),
|
|
49
|
+
sa.Computed("COALESCE(current_step >= max_step, false)", persisted=True),
|
|
50
|
+
nullable=False,
|
|
51
|
+
),
|
|
52
|
+
sa.Column("created_at", sa.TIMESTAMP(), server_default=sa.text("NOW()"), nullable=False),
|
|
53
|
+
sa.Column("updated_at", sa.TIMESTAMP(), server_default=sa.text("NOW()"), nullable=False),
|
|
54
|
+
sa.PrimaryKeyConstraint("id"),
|
|
55
|
+
sa.ForeignKeyConstraint(
|
|
56
|
+
["inferred_user_id"],
|
|
57
|
+
[f"{SCHEMA}.inferred_user.id"],
|
|
58
|
+
name="thread_inferred_user_id_fkey",
|
|
59
|
+
ondelete="CASCADE",
|
|
60
|
+
),
|
|
61
|
+
sa.ForeignKeyConstraint(
|
|
62
|
+
["feature_id"],
|
|
63
|
+
[f"{SCHEMA}.feature.id"],
|
|
64
|
+
name="thread_feature_id_fkey",
|
|
65
|
+
),
|
|
66
|
+
schema=SCHEMA,
|
|
67
|
+
)
|
|
68
|
+
op.create_index(
|
|
69
|
+
"thread_user_feature_updated_idx",
|
|
70
|
+
"thread",
|
|
71
|
+
["inferred_user_id", "feature_id", sa.text("updated_at DESC")],
|
|
72
|
+
schema=SCHEMA,
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
op.create_table(
|
|
76
|
+
"guest_feature_usage",
|
|
77
|
+
sa.Column("id", sa.Uuid(), server_default=sa.text("gen_random_uuid()"), nullable=False),
|
|
78
|
+
sa.Column("inferred_user_id", sa.Uuid(), nullable=False),
|
|
79
|
+
sa.Column("feature_id", sa.Uuid(), nullable=False),
|
|
80
|
+
sa.Column("action", sa.String(), nullable=False),
|
|
81
|
+
sa.Column("created_at", sa.TIMESTAMP(), server_default=sa.text("NOW()"), nullable=False),
|
|
82
|
+
sa.PrimaryKeyConstraint("id"),
|
|
83
|
+
sa.ForeignKeyConstraint(
|
|
84
|
+
["inferred_user_id"],
|
|
85
|
+
[f"{SCHEMA}.inferred_user.id"],
|
|
86
|
+
name="guest_feature_usage_inferred_user_id_fkey",
|
|
87
|
+
ondelete="CASCADE",
|
|
88
|
+
),
|
|
89
|
+
sa.ForeignKeyConstraint(
|
|
90
|
+
["feature_id"],
|
|
91
|
+
[f"{SCHEMA}.feature.id"],
|
|
92
|
+
name="guest_feature_usage_feature_id_fkey",
|
|
93
|
+
),
|
|
94
|
+
schema=SCHEMA,
|
|
95
|
+
)
|
|
96
|
+
op.create_index(
|
|
97
|
+
"guest_feature_usage_user_feature_action_created_idx",
|
|
98
|
+
"guest_feature_usage",
|
|
99
|
+
["inferred_user_id", "feature_id", "action", "created_at"],
|
|
100
|
+
schema=SCHEMA,
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def downgrade() -> None:
|
|
105
|
+
op.drop_index(
|
|
106
|
+
"guest_feature_usage_user_feature_action_created_idx",
|
|
107
|
+
table_name="guest_feature_usage",
|
|
108
|
+
schema=SCHEMA,
|
|
109
|
+
)
|
|
110
|
+
op.drop_table("guest_feature_usage", schema=SCHEMA)
|
|
111
|
+
op.drop_index("thread_user_feature_updated_idx", table_name="thread", schema=SCHEMA)
|
|
112
|
+
op.drop_table("thread", schema=SCHEMA)
|
|
113
|
+
op.drop_table("feature", schema=SCHEMA)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from datetime import datetime
|
|
2
2
|
from uuid import UUID
|
|
3
3
|
|
|
4
|
-
from sqlalchemy import ForeignKey, func, types
|
|
4
|
+
from sqlalchemy import Computed, ForeignKey, Index, func, text, types
|
|
5
5
|
from sqlalchemy.dialects.postgresql import ENUM, TIMESTAMP
|
|
6
6
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
7
7
|
|
|
@@ -304,3 +304,139 @@ class AnalyticForm(Base):
|
|
|
304
304
|
server_default="NOW()",
|
|
305
305
|
)
|
|
306
306
|
session = relationship("Session", foreign_keys=[session_id])
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
class Feature(Base):
|
|
310
|
+
"""
|
|
311
|
+
A WeLearn feature a user can start runs of (chat, microlearning...). Rows are
|
|
312
|
+
created by the migrations, and code finds a feature by its unique title.
|
|
313
|
+
"""
|
|
314
|
+
|
|
315
|
+
__tablename__ = "feature"
|
|
316
|
+
__table_args__ = {"schema": DbSchemaEnum.USER_RELATED.value}
|
|
317
|
+
|
|
318
|
+
id: Mapped[UUID] = mapped_column(
|
|
319
|
+
types.Uuid, primary_key=True, nullable=False, server_default="gen_random_uuid()"
|
|
320
|
+
)
|
|
321
|
+
title: Mapped[str] = mapped_column(nullable=False, unique=True)
|
|
322
|
+
created_at: Mapped[datetime] = mapped_column(
|
|
323
|
+
TIMESTAMP(timezone=False),
|
|
324
|
+
nullable=False,
|
|
325
|
+
default=func.localtimestamp(),
|
|
326
|
+
server_default="NOW()",
|
|
327
|
+
)
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
class Thread(Base):
|
|
331
|
+
"""
|
|
332
|
+
One run of a feature by a user: a chat conversation, a microlearning... For a
|
|
333
|
+
chat, the id is the agent's thread id. is_finished is computed by Postgres
|
|
334
|
+
from current_step and max_step, so it can't be written; a thread without
|
|
335
|
+
steps is never finished.
|
|
336
|
+
"""
|
|
337
|
+
|
|
338
|
+
__tablename__ = "thread"
|
|
339
|
+
__table_args__ = (
|
|
340
|
+
Index(
|
|
341
|
+
"thread_user_feature_updated_idx",
|
|
342
|
+
"inferred_user_id",
|
|
343
|
+
"feature_id",
|
|
344
|
+
text("updated_at DESC"),
|
|
345
|
+
),
|
|
346
|
+
{"schema": DbSchemaEnum.USER_RELATED.value},
|
|
347
|
+
)
|
|
348
|
+
|
|
349
|
+
id: Mapped[UUID] = mapped_column(
|
|
350
|
+
types.Uuid, primary_key=True, nullable=False, server_default="gen_random_uuid()"
|
|
351
|
+
)
|
|
352
|
+
inferred_user_id: Mapped[UUID] = mapped_column(
|
|
353
|
+
types.Uuid,
|
|
354
|
+
ForeignKey(
|
|
355
|
+
f"{DbSchemaEnum.USER_RELATED.value}.inferred_user.id",
|
|
356
|
+
name="thread_inferred_user_id_fkey",
|
|
357
|
+
ondelete="CASCADE",
|
|
358
|
+
),
|
|
359
|
+
nullable=False,
|
|
360
|
+
)
|
|
361
|
+
feature_id: Mapped[UUID] = mapped_column(
|
|
362
|
+
types.Uuid,
|
|
363
|
+
ForeignKey(
|
|
364
|
+
f"{DbSchemaEnum.USER_RELATED.value}.feature.id",
|
|
365
|
+
name="thread_feature_id_fkey",
|
|
366
|
+
),
|
|
367
|
+
nullable=False,
|
|
368
|
+
)
|
|
369
|
+
title: Mapped[str | None]
|
|
370
|
+
current_step: Mapped[int | None]
|
|
371
|
+
max_step: Mapped[int | None]
|
|
372
|
+
is_finished: Mapped[bool] = mapped_column(
|
|
373
|
+
Computed("COALESCE(current_step >= max_step, false)", persisted=True)
|
|
374
|
+
)
|
|
375
|
+
created_at: Mapped[datetime] = mapped_column(
|
|
376
|
+
TIMESTAMP(timezone=False),
|
|
377
|
+
nullable=False,
|
|
378
|
+
default=func.localtimestamp(),
|
|
379
|
+
server_default="NOW()",
|
|
380
|
+
)
|
|
381
|
+
|
|
382
|
+
updated_at: Mapped[datetime] = mapped_column(
|
|
383
|
+
TIMESTAMP(timezone=False),
|
|
384
|
+
nullable=False,
|
|
385
|
+
default=func.localtimestamp(),
|
|
386
|
+
server_default="NOW()",
|
|
387
|
+
onupdate=func.localtimestamp(),
|
|
388
|
+
)
|
|
389
|
+
inferred_user: Mapped["InferredUser"] = relationship()
|
|
390
|
+
feature: Mapped["Feature"] = relationship()
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
class GuestFeatureUsage(Base):
|
|
394
|
+
"""
|
|
395
|
+
One limited action of a guest within a feature: a chat question, a syllabus
|
|
396
|
+
generated, feedback sent on it, course files read... The API counts a
|
|
397
|
+
guest's rows of the last 24h for one (feature, action) against its daily
|
|
398
|
+
quota, deletes the latest one to refund a failed use, and can purge older
|
|
399
|
+
rows.
|
|
400
|
+
"""
|
|
401
|
+
|
|
402
|
+
__tablename__ = "guest_feature_usage"
|
|
403
|
+
__table_args__ = (
|
|
404
|
+
Index(
|
|
405
|
+
"guest_feature_usage_user_feature_action_created_idx",
|
|
406
|
+
"inferred_user_id",
|
|
407
|
+
"feature_id",
|
|
408
|
+
"action",
|
|
409
|
+
"created_at",
|
|
410
|
+
),
|
|
411
|
+
{"schema": DbSchemaEnum.USER_RELATED.value},
|
|
412
|
+
)
|
|
413
|
+
|
|
414
|
+
id: Mapped[UUID] = mapped_column(
|
|
415
|
+
types.Uuid, primary_key=True, nullable=False, server_default="gen_random_uuid()"
|
|
416
|
+
)
|
|
417
|
+
inferred_user_id: Mapped[UUID] = mapped_column(
|
|
418
|
+
types.Uuid,
|
|
419
|
+
ForeignKey(
|
|
420
|
+
f"{DbSchemaEnum.USER_RELATED.value}.inferred_user.id",
|
|
421
|
+
name="guest_feature_usage_inferred_user_id_fkey",
|
|
422
|
+
ondelete="CASCADE",
|
|
423
|
+
),
|
|
424
|
+
nullable=False,
|
|
425
|
+
)
|
|
426
|
+
feature_id: Mapped[UUID] = mapped_column(
|
|
427
|
+
types.Uuid,
|
|
428
|
+
ForeignKey(
|
|
429
|
+
f"{DbSchemaEnum.USER_RELATED.value}.feature.id",
|
|
430
|
+
name="guest_feature_usage_feature_id_fkey",
|
|
431
|
+
),
|
|
432
|
+
nullable=False,
|
|
433
|
+
)
|
|
434
|
+
action: Mapped[str] = mapped_column(nullable=False)
|
|
435
|
+
created_at: Mapped[datetime] = mapped_column(
|
|
436
|
+
TIMESTAMP(timezone=False),
|
|
437
|
+
nullable=False,
|
|
438
|
+
default=func.localtimestamp(),
|
|
439
|
+
server_default="NOW()",
|
|
440
|
+
)
|
|
441
|
+
inferred_user: Mapped["InferredUser"] = relationship()
|
|
442
|
+
feature: Mapped["Feature"] = relationship()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{welearn_database-1.5.6.dev1 → welearn_database-1.5.7.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
|
|
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
|
{welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/data/__init__.py
RENAMED
|
File without changes
|
{welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/data/details_dict.py
RENAMED
|
File without changes
|
{welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/data/enumeration.py
RENAMED
|
File without changes
|
{welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/data/models/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/data/models/grafana.py
RENAMED
|
File without changes
|
{welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/database_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
{welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/modules/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{welearn_database-1.5.6.dev1 → welearn_database-1.5.7.dev0}/welearn_database/regular_expression.py
RENAMED
|
File without changes
|