mirror of
https://github.com/oonyeje/Pearlception_Website_RoR.git
synced 2025-12-25 11:47:41 +00:00
- When creating a new company as an admin, a new database containing models for Runs, Grades, Results, Machines, and Oysters is migrated and created - When a user registers, they are automatically switched to their company's db in the server - When a user signs in they are also automatically swithched
13 lines
373 B
Ruby
13 lines
373 B
Ruby
#!/bin/env ruby
|
|
|
|
ENV['RAILS_ENV'] = "development" # Set to your desired Rails environment name
|
|
require '/../config/environment.rb'
|
|
require 'active_record'
|
|
|
|
client = Mysql2::Client.new(:adapter => "mysql2",
|
|
:host => ENV['STATS_DB_URL'],
|
|
:username => ENV['STATS_DB_USER'],
|
|
:password => ENV['STATS_DB_PASS'],
|
|
)
|
|
|
|
#client.query("CREATE DATABASE company_db") |