Initial commit

This commit is contained in:
2025-05-13 20:04:04 +02:00
parent 9f14dd6ce3
commit 4671bf27de
6 changed files with 2373 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 };