当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript umzug.down函数代码示例

本文整理汇总了TypeScript中umzug.down函数的典型用法代码示例。如果您正苦于以下问题:TypeScript down函数的具体用法?TypeScript down怎么用?TypeScript down使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了down函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1:

}).then((migrations: Umzug.Migration[]) => null);

umzug.pending().then((migrations: Umzug.Migration[]) => null);

umzug.executed().then((migrations: Umzug.Migration[]) => null);

umzug.up().then((migrations: Umzug.Migration[]) => null);

umzug.up({ to: '20141101203500-task' }).then((migrations: Umzug.Migration[]) => null);

umzug.up({ migrations: ['20141101203500-task', '20141101203501-task-2'] }).then((migrations: Umzug.Migration[]) => null);

umzug.up('20141101203500-task').then((migrations: Umzug.Migration[]) => null); // Runs just the passed migration
umzug.up(['20141101203500-task', '20141101203501-task-2']).then((migrations: Umzug.Migration[]) => null);

umzug.down().then((migrations: Umzug.Migration[]) => null);

umzug.down({ to: '20141031080000-task' }).then((migrations: Umzug.Migration[]) => null);

umzug.down({ migrations: ['20141101203500-task', '20141101203501-task-2'] }).then((migrations: Umzug.Migration[]) => null);

umzug.down('20141101203500-task').then((migrations: Umzug.Migration[]) => null);
umzug.down(['20141101203500-task', '20141101203501-task-2']).then((migrations: Umzug.Migration[]) => null);

umzug.down({ to: 0 }).then((migrations: Umzug.Migration[]) => null);

umzug.on('migrating', (name: string, migration: Umzug.Migration) => null);
umzug.on('migrated', (name: string, migration: Umzug.Migration) => null);
umzug.on('reverting', (name: string, migration: Umzug.Migration) => null);
umzug.on('reverted', (name: string, migration: Umzug.Migration) => null);
开发者ID:Engineer2B,项目名称:DefinitelyTyped,代码行数:30,代码来源:umzug-tests.ts

示例2: Umzug

  // "migrations" will be an Array of already executed migrations.
});

umzug.up().then(function (migrations) {
  // "migrations" will be an Array with the names of the
  // executed migrations.
});

umzug.up({ to: '20141101203500-task' }).then(function (migrations) {});

umzug.up({ migrations: ['20141101203500-task', '20141101203501-task-2'] });

umzug.up('20141101203500-task'); // Runs just the passed migration
umzug.up(['20141101203500-task', '20141101203501-task-2']);

umzug.down().then(function (migration) {
  // "migration" will the name of the reverted migration.
});

umzug.down({ to: '20141031080000-task' }).then(function (migrations) {
  // "migrations" will be an Array with the names of all reverted migrations.
});

umzug.down({ migrations: ['20141101203500-task', '20141101203501-task-2'] });

umzug.down('20141101203500-task'); // Runs just the passed migration
umzug.down(['20141101203500-task', '20141101203501-task-2']);

var AnotherUmzug = new Umzug({
  // The storage.
  // Possible values: 'json', 'sequelize', an object
开发者ID:Crevil,项目名称:DefinitelyTyped,代码行数:31,代码来源:umzug-tests.ts


注:本文中的umzug.down函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。