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
+27-21Lines changed: 27 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,44 +58,50 @@ 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
-
Fork repo, pull it and do next:
61
+
To run dev demo:
62
+
```sh
63
+
cd dev-demo
62
64
65
+
npm run setup-dev-demo
66
+
npm run migrate:all
63
67
64
-
```sh
65
-
cd adminforth
66
-
npm ci
67
-
npm run build
68
+
npm start
68
69
```
69
70
70
-
To run dev demo:
71
-
```sh
72
-
cd dev-demo
73
-
cp .env.sample .env
71
+
## Adding columns to a database in dev-demo
74
72
75
-
# this will install all official plugins and link adminforth package, if plugin installed it will git pull and npm ci
76
-
npm run install-plugins
73
+
Open `./migrations` folder. There is prisma migration folder for the sqlite, postgres and mysql and `clickhouse_migrations` folder for the clickhouse:
77
74
78
-
# same for official adapters
79
-
npm run install-adapters
75
+
### Migrations for the MySQL, SQLite and Postgres
76
+
To make migration add to the .prisma file in folder with database you need and add new tables or columns. Then run:
80
77
81
-
npm ci
82
78
83
-
./run_inventory.sh
79
+
```
80
+
npm run makemigration:sqlite -- --name init
81
+
```
82
+
83
+
and
84
84
85
-
npm run migrate:local
86
-
npm start
85
+
```
86
+
npm run migrate:sqlite
87
87
```
88
88
89
-
## Adding columns to a database in dev-demo
89
+
to apply migration
90
+
91
+
> use :sqlite, :mysql or :postgres for you case
92
+
93
+
### Migrations for the clickhouse
90
94
91
-
Open `.prisma` file, modify it, and run:
95
+
In order to make migration for the clickhouse, go to the `./migrations/clickhouse_migrations` folder and add migration file to the folder.
92
96
97
+
Then run
93
98
```
94
-
npm run namemigration -- --name desctiption_of_changes
99
+
npm run migrate:clickhouse
95
100
```
96
101
102
+
to apply the migration.
97
103
98
-
###Testing CLI commands during development
104
+
## Testing CLI commands during development
99
105
100
106
101
107
Make sure you have not `adminforth` globally installed. If you have it, remove it:
0 commit comments