* add segment model * add note model * db handle segment & note * add notes & segments handler * refactor media caption components * segment & note create * fix type * update note column & may sync * display selected words for note * refactor selected words * auto select words when editing note * refactor * refactor caption component * display notes * refactor notes components * fix * refactor segment & notes into context * destroy note * update locale * fix caption switch issue * fix layout * refactor caption layout * remove deprecated code * may share note * improve UI * fix notes list auto update after created * remove console.log * add notes page * refactor note parameters * refactor components * mark note on transcription * handle no notes * improve style * improve style * show context menu on selection text * fix utils
46 lines
894 B
JavaScript
46 lines
894 B
JavaScript
import { DataTypes } from "sequelize";
|
|
|
|
async function up({ context: queryInterface }) {
|
|
queryInterface.createTable("notes", {
|
|
id: {
|
|
type: DataTypes.UUID,
|
|
defaultValue: DataTypes.UUIDV4,
|
|
primaryKey: true,
|
|
allowNull: false,
|
|
},
|
|
target_type: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
},
|
|
target_id: {
|
|
type: DataTypes.UUID,
|
|
allowNull: false,
|
|
},
|
|
parameters: {
|
|
type: DataTypes.JSON,
|
|
defaultValue: {},
|
|
},
|
|
content: {
|
|
type: DataTypes.TEXT,
|
|
allowNull: false,
|
|
},
|
|
synced_at: {
|
|
type: DataTypes.DATE,
|
|
},
|
|
created_at: {
|
|
type: DataTypes.DATE,
|
|
allowNull: false,
|
|
},
|
|
updated_at: {
|
|
type: DataTypes.DATE,
|
|
allowNull: false,
|
|
},
|
|
});
|
|
}
|
|
|
|
async function down({ context: queryInterface }) {
|
|
queryInterface.dropTable("notes");
|
|
}
|
|
|
|
export { up, down };
|