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
+16-10Lines changed: 16 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,14 +58,21 @@ 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
+
61
68
To run dev demo:
62
69
```sh
63
70
cd dev-demo
64
71
65
-
npm run setup-dev-demo
66
-
npm run migrate:all
72
+
pnpm setup-dev-demo
73
+
pnpm migrate:all
67
74
68
-
npm start
75
+
pnpm start
69
76
```
70
77
71
78
## Adding columns to a database in dev-demo
@@ -77,13 +84,13 @@ To make migration add to the .prisma file in folder with database you need and a
77
84
78
85
79
86
```
80
-
npm run makemigration:sqlite -- --name init
87
+
pnpm makemigration:sqlite -- --name init
81
88
```
82
89
83
90
and
84
91
85
92
```
86
-
npm run migrate:sqlite
93
+
pnpm migrate:sqlite
87
94
```
88
95
89
96
to apply migration
@@ -96,7 +103,7 @@ In order to make migration for the clickhouse, go to the `./migrations/clickhous
96
103
97
104
Then run
98
105
```
99
-
npm run migrate:clickhouse
106
+
pnpm migrate:clickhouse
100
107
```
101
108
102
109
to apply the migration.
@@ -108,18 +115,17 @@ Make sure you have not `adminforth` globally installed. If you have it, remove i
108
115
109
116
110
117
```sh
111
-
npm uninstall -g adminforth
118
+
pnpm uninstall -g adminforth
112
119
```
113
120
114
121
Then, in the root of the project, run once:
115
122
116
123
```
117
124
cd adminforth/adminforth
118
-
npm run build
125
+
pnpm build
126
+
pnpm linl
119
127
```
120
128
121
-
This will automatically make an npm link to the `adminforth` package in the root of the project.
122
-
123
129
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
-
npm run makemigration -- --name init
84
+
pnpm 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:
90
90
91
91
```bash
92
-
npm run makemigration -- --name init ;npm run migrate:local
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