You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-16Lines changed: 10 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,21 +58,14 @@ npx adminforth create-app
58
58
59
59
The most convenient way to add new features or fixes is using `dev-demo`. It imports the source code of the repository and plugins so you can edit them and see changes on the fly.
60
60
61
-
# Requirements
62
-
63
-
-**Node.js 20**
64
-
-**Docker**
65
-
-**pnpm**
66
-
-**Taskfile**
67
-
68
61
To run dev demo:
69
62
```sh
70
63
cd dev-demo
71
64
72
-
pnpm setup-dev-demo
73
-
pnpm migrate:all
65
+
npm run setup-dev-demo
66
+
npm run migrate:all
74
67
75
-
pnpm start
68
+
npm start
76
69
```
77
70
78
71
## Adding columns to a database in dev-demo
@@ -84,13 +77,13 @@ To make migration add to the .prisma file in folder with database you need and a
84
77
85
78
86
79
```
87
-
pnpm makemigration:sqlite -- --name init
80
+
npm run makemigration:sqlite -- --name init
88
81
```
89
82
90
83
and
91
84
92
85
```
93
-
pnpm migrate:sqlite
86
+
npm run migrate:sqlite
94
87
```
95
88
96
89
to apply migration
@@ -103,7 +96,7 @@ In order to make migration for the clickhouse, go to the `./migrations/clickhous
103
96
104
97
Then run
105
98
```
106
-
pnpm migrate:clickhouse
99
+
npm run migrate:clickhouse
107
100
```
108
101
109
102
to apply the migration.
@@ -115,17 +108,18 @@ Make sure you have not `adminforth` globally installed. If you have it, remove i
115
108
116
109
117
110
```sh
118
-
pnpm uninstall -g adminforth
111
+
npm uninstall -g adminforth
119
112
```
120
113
121
114
Then, in the root of the project, run once:
122
115
123
116
```
124
117
cd adminforth/adminforth
125
-
pnpm build
126
-
pnpm linl
118
+
npm run build
127
119
```
128
120
121
+
This will automatically make an npm link to the `adminforth` package in the root of the project.
122
+
129
123
Then, go to testing app, e.g. created with CLI, and use next command:
Copy file name to clipboardExpand all lines: adminforth/documentation/docs/tutorial/001-gettingStarted.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,25 +81,25 @@ myadmin/
81
81
CLI will suggest you a command to initialize the database with Prisma:
82
82
83
83
```bash
84
-
pnpm makemigration -- --name init
84
+
npm run makemigration -- --name init
85
85
```
86
86
87
87
This will create a migration file in `migrations` and apply it to the database.
88
88
89
89
In future, when you need to add new resources, you need to modify `schema.prisma` (add models, change fields, etc.). After doing any modification you need to create a new migration using next command:
Copy file name to clipboardExpand all lines: adminforth/documentation/docs/tutorial/03-Customization/03-virtualColumns.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -148,7 +148,7 @@ In this case you can use `insecureRawSQL` to write your own part of where clause
148
148
However the vital concern that the SQL passed to DB as is, so if you substitute any user inputs it will not be escaped and can lead to SQL injection. To mitigate the issue we recommend using `sqlstring` package which will escape the inputs for you.
0 commit comments