feat(survey): added survey table

This commit is contained in:
Aminejv 2021-07-27 16:13:24 +01:00
parent 44b8e0d9af
commit 66254a8d99

View File

@ -181,6 +181,14 @@ const createTwitterTokensTable = db.schema.createTable("twitterTokens", function
table.string("verified").nullable();
});
const createSurveysTable = db.schema.createTable("surveys", function (table) {
table.uuid("id").primary().unique().notNullable().defaultTo(db.raw("uuid_generate_v4()"));
table.uuid("ownerId").references("id").inTable("users");
table.string("prevTools").notNullable();
table.string("usecases").notNullable();
table.string("referrals").notNullable();
});
// --------------------------
// RUN
// --------------------------
@ -200,6 +208,7 @@ Promise.all([
createGlobalTable,
createUsageTable,
createTwitterTokensTable,
createSurveysTable,
]);
Logging.log(`FINISHED: seed-database.js`);