MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / up

Method up

tests/features/migrations/Migrator.postgres.test.ts:27–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25
26class MigrationTest2 extends Migration {
27 async up(): Promise<void> {
28 this.addSql('select 1 + 1');
29 this.addSql(raw('select 1 + 1'));
30 this.addSql(raw('select 2 + 2 as count2'));
31 const res = await this.execute('select 1 + 1 as count1');
32 expect(res).toEqual([{ count1: 2 }]);
33
34 await this.getEntityManager().persist(FooBar2.create('fb')).flush();
35 }
36
37 override isTransactional(): boolean {
38 return false;

Callers

nothing calls this directly

Calls 6

rawFunction · 0.90
executeMethod · 0.65
persistMethod · 0.65
createMethod · 0.65
flushMethod · 0.45
getEntityManagerMethod · 0.45

Tested by

no test coverage detected