mirror of
https://github.com/pawelmalak/snippet-box.git
synced 2025-12-21 21:33:10 +01:00
React client with context for state management
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user