Final prep for production
This commit is contained in:
@@ -103,6 +103,36 @@ app/
|
||||
|
||||
---
|
||||
|
||||
## Installation
|
||||
|
||||
### Fresh server
|
||||
|
||||
```bash
|
||||
# 1. Create schema and both databases
|
||||
mysql -uroot -p < install.sql
|
||||
|
||||
# 2. Register baseline — must run once after install.sql
|
||||
php migrate.php
|
||||
```
|
||||
|
||||
### Updating an existing install
|
||||
|
||||
```bash
|
||||
# Apply any pending migrations
|
||||
php migrate.php
|
||||
```
|
||||
|
||||
Add new migrations as `migrations/YYYYMMDD_NNN_description.sql`. The first line must declare the target database:
|
||||
|
||||
```sql
|
||||
-- db: wms2
|
||||
ALTER TABLE md_product ADD COLUMN weight decimal(10,2) NOT NULL DEFAULT 0.00;
|
||||
```
|
||||
|
||||
See `docs/DEPLOYMENT.md` for full setup (Apache, PHP config, uploads directory, HTTPS checklist).
|
||||
|
||||
---
|
||||
|
||||
## Local Development
|
||||
|
||||
```bash
|
||||
@@ -116,9 +146,6 @@ npm run build
|
||||
|
||||
# Syntax-check a PHP file
|
||||
php -l app/ics/manage_stock_in.php
|
||||
|
||||
# Apply a schema migration to the client database
|
||||
mysql -uroot -p2618 wms2 < migration.sql
|
||||
```
|
||||
|
||||
App is served by Apache at `http://localhost/wms/app/`.
|
||||
|
||||
Reference in New Issue
Block a user