React client with context for state management

This commit is contained in:
unknown
2021-09-21 13:20:51 +02:00
parent e9b024f4df
commit 4feb069ac1
29 changed files with 326 additions and 4 deletions

View File

@@ -4,7 +4,7 @@ import {
SnippetCreationAttributes
} from '../../typescript/interfaces';
const { INTEGER, STRING, DATE } = DataTypes;
const { INTEGER, STRING, DATE, TEXT } = DataTypes;
export const up = async (queryInterface: QueryInterface): Promise<void> => {
await queryInterface.createTable<Model<Snippet, SnippetCreationAttributes>>(
@@ -20,10 +20,24 @@ export const up = async (queryInterface: QueryInterface): Promise<void> => {
type: STRING,
allowNull: false
},
description: {
type: TEXT,
allowNull: true,
defaultValue: ''
},
language: {
type: STRING,
allowNull: false
},
code: {
type: TEXT,
allowNull: false
},
docs: {
type: TEXT,
allowNull: true,
defaultValue: ''
},
createdAt: {
type: DATE,
allowNull: false