Skip to content

Commit

Permalink
Remove CreatedAt and UpdatedAt tables
Browse files Browse the repository at this point in the history
  • Loading branch information
sthuray committed Jun 15, 2024
1 parent 796e789 commit 16101c7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 27 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { DataType } from "sequelize-typescript";

import { Migration } from "../umzug";

const TABLE_NAME = "activities";

export const up: Migration = async ({ context: sequelize }) => {
await sequelize.getQueryInterface().createTable(TABLE_NAME, {
id: {
type: DataType.INTEGER,
allowNull: false,
primaryKey: true,
autoIncrement: true,
},
activity_name: {
type: DataType.STRING,
allowNull: false,
},
});
};

export const down: Migration = async ({ context: sequelize }) => {
await sequelize.getQueryInterface().dropTable(TABLE_NAME);
};
1 change: 0 additions & 1 deletion backend/typescript/models/activity.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Column, Model, Table } from "sequelize-typescript";

@Table({ tableName: "activities" })
export default class Activities extends Model {

@Column
activity_name!: string;
}

0 comments on commit 16101c7

Please sign in to comment.