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