déplacement url de connexion de la base de donnée
This commit is contained in:
parent
77c5ffbdcf
commit
eb02269bbb
2 changed files with 5 additions and 2 deletions
|
@ -1,8 +1,8 @@
|
||||||
import sqlite3
|
import sqlite3
|
||||||
|
|
||||||
class Database:
|
class Database:
|
||||||
def __init__(self):
|
def __init__(self, urlDatabase):
|
||||||
self.connexion = self.createConnection(r"src/db/bot.sqlite3")
|
self.connexion = self.createConnection(urlDatabase)
|
||||||
|
|
||||||
def createConnection(self, path):
|
def createConnection(self, path):
|
||||||
"""Connexion à une base de donnée SQLite"""
|
"""Connexion à une base de donnée SQLite"""
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
from utils.db import Database
|
from utils.db import Database
|
||||||
|
|
||||||
class Reminder(Database):
|
class Reminder(Database):
|
||||||
|
def __init__(self):
|
||||||
|
super().__init__(r"src/db/bot.sqlite3")
|
||||||
|
|
||||||
def creationTable(self):
|
def creationTable(self):
|
||||||
"""Créer la table qui stocker les reminders"""
|
"""Créer la table qui stocker les reminders"""
|
||||||
requete = """
|
requete = """
|
||||||
|
|
Reference in a new issue