當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。