Rename database_setup directory to database.
This commit is contained in:
@@ -5,7 +5,7 @@ from nextcord.ext import commands
|
|||||||
from sqlalchemy import exc, select
|
from sqlalchemy import exc, select
|
||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
from database_setup.db import Category, CategoryGroup, engine
|
from database.db import Category, CategoryGroup, engine
|
||||||
from utilities.utils import MAX_LINE_LENGTH, autofill_groups, send_highscore_message
|
from utilities.utils import MAX_LINE_LENGTH, autofill_groups, send_highscore_message
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ from sqlalchemy import distinct, select
|
|||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
# pylint: disable=import-error
|
# pylint: disable=import-error
|
||||||
from database_setup.db import Category, CategoryGroup, Score, engine
|
from database.db import Category, CategoryGroup, Score, engine
|
||||||
from utilities.utils import (
|
from utilities.utils import (
|
||||||
autofill_categories,
|
autofill_categories,
|
||||||
autofill_groups,
|
autofill_groups,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ from sqlalchemy import select
|
|||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
# pylint: disable=import-error
|
# pylint: disable=import-error
|
||||||
from database_setup.db import CategoryGroup, engine
|
from database.db import CategoryGroup, engine
|
||||||
from utilities.utils import autofill_groups, send_highscore_message
|
from utilities.utils import autofill_groups, send_highscore_message
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ from sqlalchemy import select
|
|||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
# pylint: disable=import-error
|
# pylint: disable=import-error
|
||||||
from database_setup.db import CategoryGroup, Guild, engine
|
from database.db import CategoryGroup, Guild, engine
|
||||||
from utilities.utils import MAX_LINE_LENGTH, autofill_groups
|
from utilities.utils import MAX_LINE_LENGTH, autofill_groups
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ from sqlalchemy import select
|
|||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
from cogs.submission.verification_view import VerificationView
|
from cogs.submission.verification_view import VerificationView
|
||||||
from database_setup.db import Category, CategoryGroup, Guild, Submission, engine
|
from database.db import Category, CategoryGroup, Guild, Submission, engine
|
||||||
from main import logger
|
from main import logger
|
||||||
from utilities.utils import autofill_categories, autofill_groups, submit_score
|
from utilities.utils import autofill_categories, autofill_groups, submit_score
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ from sqlalchemy import select
|
|||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
# pylint: disable=import-error
|
# pylint: disable=import-error
|
||||||
from database_setup.db import Guild, engine
|
from database.db import Guild, engine
|
||||||
from utilities.utils import autofill_users_in_guild
|
from utilities.utils import autofill_users_in_guild
|
||||||
|
|
||||||
from .views.update_username_verify import UpdateUsernameVerifyView
|
from .views.update_username_verify import UpdateUsernameVerifyView
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ from sqlalchemy import select
|
|||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
# pylint: disable=import-error
|
# pylint: disable=import-error
|
||||||
from database_setup.db import Category, CategoryGroup, Score, engine
|
from database.db import Category, CategoryGroup, Score, engine
|
||||||
from utilities.utils import MAX_LINE_LENGTH, autofill_categories, autofill_groups, format_score_string
|
from utilities.utils import MAX_LINE_LENGTH, autofill_categories, autofill_groups, format_score_string
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ from sqlalchemy import delete, select
|
|||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
# pylint: disable=import-error
|
# pylint: disable=import-error
|
||||||
from database_setup.db import Category, CategoryGroup, engine
|
from database.db import Category, CategoryGroup, engine
|
||||||
from utilities.utils import send_highscore_message
|
from utilities.utils import send_highscore_message
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ from sqlalchemy import distinct, exc, select
|
|||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
# pylint: disable=import-error
|
# pylint: disable=import-error
|
||||||
from database_setup.db import Category, CategoryGroup, Score, engine
|
from database.db import Category, CategoryGroup, Score, engine
|
||||||
from utilities.utils import send_highscore_message
|
from utilities.utils import send_highscore_message
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ from sqlalchemy import select
|
|||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
# pylint: disable=import-error
|
# pylint: disable=import-error
|
||||||
from database_setup.db import Guild, engine
|
from database.db import Guild, engine
|
||||||
|
|
||||||
|
|
||||||
class GuildListener(commands.Cog, name="Guild Listener"):
|
class GuildListener(commands.Cog, name="Guild Listener"):
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ from sqlalchemy import select
|
|||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
# pylint: disable=import-error
|
# pylint: disable=import-error
|
||||||
from database_setup.db import Guild, engine
|
from database.db import Guild, engine
|
||||||
|
|
||||||
|
|
||||||
class GuildData(commands.Cog, name="Guild Data"):
|
class GuildData(commands.Cog, name="Guild Data"):
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import nextcord
|
|||||||
from sqlalchemy import delete, select
|
from sqlalchemy import delete, select
|
||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
from database_setup.db import Submission, engine
|
from database.db import Submission, engine
|
||||||
|
|
||||||
# pylint: disable=import-error
|
# pylint: disable=import-error
|
||||||
from utilities.utils import submit_score
|
from utilities.utils import submit_score
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
from database_setup.models import CategoryGroup, Guild
|
|
||||||
from sqlmodel import Session, SQLModel, create_engine
|
from sqlmodel import Session, SQLModel, create_engine
|
||||||
|
|
||||||
|
from database.models import CategoryGroup, Guild
|
||||||
|
|
||||||
url = "sqlite:///database.db"
|
url = "sqlite:///database.db"
|
||||||
engine = create_engine(url)
|
engine = create_engine(url)
|
||||||
SQLModel.metadata.create_all(engine)
|
SQLModel.metadata.create_all(engine)
|
||||||
+1
-1
@@ -8,7 +8,7 @@ from sqlalchemy import distinct, select
|
|||||||
from sqlalchemy.orm import Session, aliased
|
from sqlalchemy.orm import Session, aliased
|
||||||
|
|
||||||
# pylint: disable=import-error
|
# pylint: disable=import-error
|
||||||
from database_setup.db import Category, CategoryGroup, Guild, Score, engine
|
from database.db import Category, CategoryGroup, Guild, Score, engine
|
||||||
|
|
||||||
MAX_LINE_LENGTH = 142
|
MAX_LINE_LENGTH = 142
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user