Initial commit

This commit is contained in:
2025-05-13 20:05:28 +02:00
parent 49ca93144e
commit 0e47756bd0
10 changed files with 3716 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
const { Sequelize, DataTypes } = require('sequelize');
// Initialize SQLite database
const sequelize = new Sequelize({
dialect: 'sqlite',
storage: './birthdays.sqlite',
});
// Define the Birthday model
const Birthday = sequelize.define('Birthday', {
userId: {
type: DataTypes.STRING,
allowNull: false,
unique: true,
},
date: {
type: DataTypes.STRING, // Store as MM-DD
allowNull: false,
},
});
// Sync the database
(async () => {
await sequelize.sync({ alter: true });
console.log('Database synced!');
})();
module.exports = { sequelize, Birthday };