Compare commits
No commits in common. "da81df40282dfb9bee902f7860625274c6fe97b6" and "90f74110a934b815ed562b2b1cbba92940f41748" have entirely different histories.
da81df4028
...
90f74110a9
|
@ -4,7 +4,6 @@
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h3 class="card-title">{{ task.name }}</h3>
|
<h3 class="card-title">{{ task.name }}</h3>
|
||||||
<ul class="list-group list-group-flush">
|
<ul class="list-group list-group-flush">
|
||||||
<li class="list-group-item">Дата и время: {{ task.datetime }}</li>
|
|
||||||
<li class="list-group-item">Статус: {{ task.status }}</li>
|
<li class="list-group-item">Статус: {{ task.status }}</li>
|
||||||
<li class="list-group-item">Сообщение: {{ task.status_message }}</li>
|
<li class="list-group-item">Сообщение: {{ task.status_message }}</li>
|
||||||
<li class="list-group-item">Действие: {{ task.type }}</li>
|
<li class="list-group-item">Действие: {{ task.type }}</li>
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
import datetime
|
from sqlalchemy import Integer
|
||||||
|
|
||||||
from sqlalchemy import Integer, DateTime
|
|
||||||
from sqlalchemy.schema import Column, ForeignKey
|
from sqlalchemy.schema import Column, ForeignKey
|
||||||
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
||||||
from app.extensions import db
|
from app.extensions import db
|
||||||
|
@ -13,7 +11,6 @@ class Task(db.Model):
|
||||||
|
|
||||||
session_id = Column(Integer, ForeignKey("session.id"))
|
session_id = Column(Integer, ForeignKey("session.id"))
|
||||||
session: Mapped['Session'] = relationship("Session", back_populates="tasks")
|
session: Mapped['Session'] = relationship("Session", back_populates="tasks")
|
||||||
datetime: Mapped[DateTime] = Column(DateTime, default=datetime.datetime.utcnow().strftime("%d.%m.%y %H:%M"))
|
|
||||||
status: Mapped[str]
|
status: Mapped[str]
|
||||||
status_message: Mapped[str]
|
status_message: Mapped[str]
|
||||||
type: Mapped[str]
|
type: Mapped[str]
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
"""Added datetime to task
|
|
||||||
|
|
||||||
Revision ID: cdd471f48b0d
|
|
||||||
Revises: af22ea98e0da
|
|
||||||
Create Date: 2024-02-03 11:36:03.826063
|
|
||||||
|
|
||||||
"""
|
|
||||||
from alembic import op
|
|
||||||
import sqlalchemy as sa
|
|
||||||
|
|
||||||
|
|
||||||
# revision identifiers, used by Alembic.
|
|
||||||
revision = 'cdd471f48b0d'
|
|
||||||
down_revision = 'af22ea98e0da'
|
|
||||||
branch_labels = None
|
|
||||||
depends_on = None
|
|
||||||
|
|
||||||
|
|
||||||
def upgrade():
|
|
||||||
# ### commands auto generated by Alembic - please adjust! ###
|
|
||||||
with op.batch_alter_table('task', schema=None) as batch_op:
|
|
||||||
batch_op.add_column(sa.Column('datetime', sa.DateTime(), nullable=True))
|
|
||||||
|
|
||||||
# ### end Alembic commands ###
|
|
||||||
|
|
||||||
|
|
||||||
def downgrade():
|
|
||||||
# ### commands auto generated by Alembic - please adjust! ###
|
|
||||||
with op.batch_alter_table('task', schema=None) as batch_op:
|
|
||||||
batch_op.drop_column('datetime')
|
|
||||||
|
|
||||||
# ### end Alembic commands ###
|
|
|
@ -30,7 +30,6 @@ PyQt5==5.15.10
|
||||||
PyQt5-Qt5==5.15.2
|
PyQt5-Qt5==5.15.2
|
||||||
PyQt5-sip==12.13.0
|
PyQt5-sip==12.13.0
|
||||||
python-dateutil==2.8.2
|
python-dateutil==2.8.2
|
||||||
python-dotenv==1.0.1
|
|
||||||
redis==5.0.1
|
redis==5.0.1
|
||||||
rsa==4.9
|
rsa==4.9
|
||||||
six==1.16.0
|
six==1.16.0
|
||||||
|
|
Loading…
Reference in New Issue