Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.

Remove seeds #277 #279

Merged
merged 2 commits into from
May 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions docs/seeds/introduction.md

This file was deleted.

4 changes: 0 additions & 4 deletions docs/v2/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,6 @@ For more please visit this page for configuration idea: https://github.com/Uconn
For graphql: https://github.com/Uconnect-Technologies/wertik-js/blob/master/src/framework/graphql/crudGenerator.ts#L112
For rest api: https://github.com/Uconnect-Technologies/wertik-js/blob/master/src/framework/restApi/versions/v1/loadAllModules.ts#L40

#### seeds

(We recommend to use some other seed helpers like knex seeds or sequelize seeds).

#### sockets - beta

**Type:** Object
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wertik-js",
"version": "2.0.6",
"version": "2.0.61",
"main": "lib/main.js",
"repository": "https://github.com/Uconnect-Technologies/wertik-js.git",
"keywords": [
Expand Down
2 changes: 0 additions & 2 deletions src/devServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ connectDatabase(configuration.database)
configuration.databaseInstance = databaseInstance;
serve(configuration).then((wertikApp: any) => {
wertikApp.database.sync();
// To run seeds you need code below. In Array you have Array<String>, where you can assign module name to create.
// wertikApp.seeds(['RolePermission'])
});
})
.catch((e) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,23 +187,6 @@ export default {
},
},
},
seeds: {
RolePermission: [
{
value: { role_id: 1, permission_id: 1 },
afterCreate(instance) {
console.log("Role permission created", instance.id);
},
},
],
Permission: [
{
value: { name: "ca", cant: "true", can: "true" },
},
{ value: { name: "ca1", cant: "true1", can: "true1" } },
{ value: { name: "ca2", cant: "true2", can: "true2" } },
],
},
sockets: {
disable: false,
middlewares: [
Expand Down
26 changes: 0 additions & 26 deletions src/framework/seeds/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/framework/types/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ export interface IConfiguration {
graphql: IConfigurationGraphql;
modules: Array<IConfigurationCustomModule>;
events: IConfigurationEvents;
seeds: any;
sockets: ISocketConfiguration;
rbac: IConfigurationRbac;
storage: IConfigurationStorage;
Expand Down