MySql - Migrations
Concept of migration files, how to generate and edit them through rails commands. And - how their nomenclature explained. Source.
We need to create migrations for backend.timesvr.com/myadmin database changes, in particular for introducing pools.
To access database structure via production MySQL - source
Back on local we generate model migration:
$bundle exec rails generate model task_pools
This will create a migration file in db/migrate folder of app and will look like this:
Next we compare database entries for conflicts on both VPS and local
$bundle exec rake db:migrate:down VERSION=20170403002821
$bundle exec rake db:migrate
That didn’t work. So trying the redo migrate command. Editing timestamp_create_aide_pools.rb file to make table edits and then running:
$ bundle exec rake db:migrate:redo VERSION=20170403002821
IT WORKED!
We are having issues with MUL keys, here are resources to experiment with:
Ngrok
It’s in your local downloads folder.
Run app locally in terminal.
In another terminal window run in downloads
Share https (ngrok.io) url with tester
Getting Sign Up + Sign In to work on LocalHost - Create Coupon
1. Under /db/migrate/006_create_coupons.rb
2. All A1, P1, T1 and A3, P3, T3 need to have non-nil and non zero values
This way,
TimeSvr main index css/html update
popup Form
modal to rails - 1
modal to rails - 2
There is a splash header html and header html. Logic of which gets displayed on index.html is dictated here:
app/views/layouts/application.html.erb
and like so:
Also, in app/controllers/main_controller.rb -> if you’re logged in and splash_page true, you are redirected to dashboard
Make copies of all css/html/navigation files and start with blank canvas
To load database when cloning existing rails app, do:
and not rake db:migrate (this runs all migrations..database changes..from start of app till current time. We don’t want that as it creates conflicts)