1.0.1 • Published 1 month ago

@golee/migrations-nest v1.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 month ago

Migrations

Below an example of how to configure two migrations scripts (order matters) and their dependencies.

MigrationsModule.forRoot({
    mongoDbConnectionName: 'monogoose_connection_name', // If not specified will use the default connection
	scripts: [
		{
			provide: 'MigrationExample1',
			useFactory: (repo: Repo) => {
				return new MigrationExample1(repo);
			},
			inject: [Repo],
		},
		{
			provide: 'MigrationExample2',
			useFactory: (providerx: ProviderX) => {
				return new MigrateDeletedGeorgianClubs(providerx);
			},
			inject: [ProviderX],
		},
	],
	imports: [
		XModule,
		MongooseModule.forFeature([{ name: 'XModel', schema: XModel, collection: 'xmodels' }]),
	],
})
1.0.1

1 month ago

1.0.0

1 month ago

0.8.2

2 months ago

0.8.1

1 year ago

0.8.0

1 year ago

0.7.2

1 year ago

0.7.1

1 year ago

0.7.4

1 year ago

0.7.3

1 year ago

0.5.0

1 year ago

0.4.0

1 year ago

0.7.0

1 year ago

0.6.0

1 year ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago