# Make DB changes



### DB changes (We using migrations)

* Doc: [https://laravel.com/docs/7.x/migrations](https://laravel.com/docs/7.x/migrations) (For more DB changes)

**Create Table:**

* php artisan make:migration create\_users\_table --create=users

**Update Table:**

* php artisan make:migration add\_votes\_to\_users\_table --table=users\
  This will generate a file in database\migrations folder

### Apply DB changes

Move the file to database\migrations\2022-general\
For each year we create a new folder.\
\
**Command:**

* php artisan migrate --path=database/migrations/2022-general\
  \
  This will add DB changes to the same source as your ENV file is set to at the moment. (You could run this command on your local machine to do changes directly on AWS RDS Production server, be careful). If you run this command on production server make sure you go to correct folder: cd to go to /var/www/html
