Init commit

This commit is contained in:
ShreejitPanchal
2026-05-19 19:56:02 +08:00
commit 6601501eff
4047 changed files with 2185372 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
import * as Sequelize from 'sequelize'
async function up (utils: {
transaction: Sequelize.Transaction
queryInterface: Sequelize.QueryInterface
sequelize: Sequelize.Sequelize
}): Promise<void> {
const query = `
CREATE TABLE IF NOT EXISTS "eventRegistration" (
"id" SERIAL PRIMARY KEY,
"eventId" INTEGER NOT NULL REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
"firstName" VARCHAR(255) NOT NULL,
"lastName" VARCHAR(255) NOT NULL,
"email" VARCHAR(320) NOT NULL,
"phone" VARCHAR(50) NOT NULL,
"companyName" VARCHAR(255) NOT NULL,
"jobTitle" VARCHAR(255) NOT NULL,
"country" VARCHAR(100) NOT NULL,
"createdAt" TIMESTAMP WITH TIME ZONE NOT NULL,
"updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL
)
`
await utils.sequelize.query(query, { transaction: utils.transaction })
await utils.sequelize.query(
`CREATE INDEX "idx_event_registration_eventId" ON "eventRegistration" ("eventId")`,
{ transaction: utils.transaction }
)
}
function down (options) {
throw new Error('Not implemented.')
}
export {
up,
down
}