Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f1e9e39fe5 | |||
| b412313fc5 | |||
| cba6eac501 | |||
| 443c6262b7 | |||
| 2ba97cee4a | |||
| 8c714cb45c | |||
| c93e1a8bdd |
@@ -12,6 +12,7 @@ DATABASE_PASSWORD=FirstAdvance!
|
||||
DATABASE_HOST=dev-data.simbrellang.net
|
||||
DATABASE_PORT=10532
|
||||
DATABASE_NAME=firstadvancedev
|
||||
#SQLALCHEMY_DATABASE_URI_FULL="oracle+oracledb://FIRSTADVSTG:Pchanged_56789@10.2.110.30:1521/?service_name=firstadv"
|
||||
|
||||
# DATABASE_HOST=10.20.30.60
|
||||
# DATABASE_USER=firstadvance
|
||||
|
||||
+4
-1
@@ -24,7 +24,10 @@ class Config:
|
||||
# Database Connection
|
||||
# SQLALCHEMY_DATABASE_URI = f"postgresql+psycopg2://{DATABASE_USER}:{DATABASE_PASSWORD}@{DATABASE_HOST}:{DATABASE_PORT}/{DATABASE_NAME}"
|
||||
|
||||
SQLALCHEMY_DATABASE_URI = (f"oracle+oracledb://{DATABASE_USER}:{DATABASE_PASSWORD}@{DNS}")
|
||||
SQLALCHEMY_DATABASE_URI_INTERNAL = (f"oracle+oracledb://{DATABASE_USER}:{DATABASE_PASSWORD}@{DNS}")
|
||||
SQLALCHEMY_DATABASE_URI = os.getenv("SQLALCHEMY_DATABASE_URI_FULL", SQLALCHEMY_DATABASE_URI_INTERNAL)
|
||||
|
||||
#SQLALCHEMY_DATABASE_URI_FULL = 'oracle+oracledb://FIRSTADVSTG:Pchanged_56789@10.2.110.30:1521/?service_name=firstadv'
|
||||
|
||||
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
||||
|
||||
|
||||
@@ -17,6 +17,11 @@ class LoanRepaymentSchedule(db.Model):
|
||||
total_repayment_amount = db.Column(db.Float, default=0.0)
|
||||
paid = db.Column(db.Boolean, default=False)
|
||||
paid_at = db.Column(db.DateTime, nullable=True)
|
||||
due_process_date = db.Column(db.DateTime, nullable=True)
|
||||
due_process_count = db.Column(db.Integer, default=0)
|
||||
paid_status = db.Column(db.String(20), nullable=True)
|
||||
repay_description = db.Column(db.String(255), nullable=True)
|
||||
partial_balance = db.Column(db.Float, default=0.0)
|
||||
|
||||
created_at = db.Column(db.DateTime(timezone=True), server_default=func.now())
|
||||
updated_at = db.Column(db.DateTime(timezone=True), server_default=func.now(), onupdate=func.now())
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 30b45df851fa
|
||||
Revises: d59bfb9ead82
|
||||
Create Date: 2025-08-26 13:48:27.458593
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '30b45df851fa'
|
||||
down_revision = 'd59bfb9ead82'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column(
|
||||
'loan_repayment_schedules',
|
||||
sa.Column('paid_status', sa.String(length=20), nullable=True),
|
||||
)
|
||||
|
||||
op.add_column(
|
||||
'loan_repayment_schedules',
|
||||
sa.Column('repay_description', sa.String(length=255), nullable=True),
|
||||
)
|
||||
|
||||
|
||||
op.add_column(
|
||||
'loan_repayment_schedules',
|
||||
sa.Column('partial_balance', sa.Float(), nullable=True),
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('loan_repayment_schedules', 'partial_balance')
|
||||
op.drop_column('loan_repayment_schedules', 'repay_description')
|
||||
op.drop_column('loan_repayment_schedules', 'paid_status')
|
||||
|
||||
# ### end Alembic commands ###
|
||||
@@ -0,0 +1,38 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: d59bfb9ead82
|
||||
Revises: 05b5494ad406
|
||||
Create Date: 2025-08-21 14:22:19.220158
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'd59bfb9ead82'
|
||||
down_revision = '05b5494ad406'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
|
||||
op.add_column(
|
||||
'loan_repayment_schedules',
|
||||
sa.Column('due_process_date', sa.DateTime(), nullable=True)
|
||||
)
|
||||
|
||||
# Add due_process_count column
|
||||
op.add_column(
|
||||
'loan_repayment_schedules',
|
||||
sa.Column('due_process_count', sa.Integer(), nullable=True)
|
||||
)
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('loan_repayment_schedules', 'due_process_date')
|
||||
op.drop_column('loan_repayment_schedules', 'due_process_count')
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user