@cheetah.js/orm 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/dist/bun/index.d.ts +1 -2
- package/dist/bun/index.js +625 -546
- package/dist/bun/index.js.map +23 -23
- package/dist/entry.d.ts +2 -0
- package/dist/entry.js +6 -0
- package/dist/entry.js.map +1 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -4
- package/dist/index.js.map +1 -1
- package/dist/migration/migrator.d.ts +1 -1
- package/dist/migration/migrator.js +5 -6
- package/dist/migration/migrator.js.map +1 -1
- package/dist/orm.d.ts +3 -2
- package/dist/orm.js +24 -6
- package/dist/orm.js.map +1 -1
- package/dist/orm.service.d.ts +4 -2
- package/dist/orm.service.js +9 -4
- package/dist/orm.service.js.map +1 -1
- package/package.json +1 -1
- package/src/entry.ts +6 -0
- package/src/index.ts +1 -6
- package/src/migration/migrator.ts +5 -6
- package/src/orm.service.ts +9 -4
- package/src/orm.ts +11 -5
- package/test/node-database.ts +4 -6
- package/test/migration/.sql +0 -5
package/README.md
CHANGED
|
@@ -223,6 +223,19 @@ const user = await User.findOne({
|
|
|
223
223
|
| $or | Or | Joins query clauses with a logical OR returns all documents that match the conditions of either clause. |
|
|
224
224
|
| $not | Not | Inverts the effect of a query expression and returns documents that do not match the query expression. |
|
|
225
225
|
|
|
226
|
+
### [Migrations](#migrations)
|
|
227
|
+
Cheetah ORM is capable of creating and running migrations.
|
|
228
|
+
You must have the connection configuration file in the project root "cheetah.config.ts".
|
|
229
|
+
To create a migration, run the command below:
|
|
226
230
|
|
|
231
|
+
```bash
|
|
232
|
+
bun cheetah-orm migration:generate
|
|
233
|
+
```
|
|
234
|
+
This command will create a migration file in the path defined in the configuration file, differentiating your entities created with the database.
|
|
227
235
|
|
|
236
|
+
#### Example:
|
|
237
|
+
```bash
|
|
238
|
+
bun cheetah-orm migration:run
|
|
239
|
+
```
|
|
240
|
+
This command will run all migrations that have not yet been run.
|
|
228
241
|
|
package/dist/bun/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Cheetah } from '@cheetah.js/core';
|
|
2
1
|
export * from './decorators/entity.decorator';
|
|
3
2
|
export * from './decorators/property.decorator';
|
|
4
3
|
export * from './decorators/primary-key.decorator';
|
|
@@ -10,4 +9,4 @@ export * from './domain/base-entity';
|
|
|
10
9
|
export * from './driver/pg-driver';
|
|
11
10
|
export * from './utils';
|
|
12
11
|
export * from './driver/driver.interface';
|
|
13
|
-
export
|
|
12
|
+
export * from './entry';
|