Class | RailsInstaller::Database |
In: |
lib/rails-installer/databases.rb
lib/rails-installer/databases.rb |
Parent: | Object |
Parent class for database plugins for the installer. To create a new database handler, subclass this class and define a yml class and optionally a create_database method.
Back up the database. This is fully DB and schema agnostic. It serializes all tables to a single YAML file.
Back up the database. This is fully DB and schema agnostic. It serializes all tables to a single YAML file.
Connect to the database (using the ‘database.yml’ generated by the yml method). Returns true if the database already exists, and false if the database doesn‘t exist yet.
Connect to the database (using the ‘database.yml’ generated by the yml method). Returns true if the database already exists, and false if the database doesn‘t exist yet.
Create the database, including schema creation. This should be generic enough that database-specific drivers don‘t need to override it.
It calls create_database to actually build a new DB from scratch if needed.
Create the database, including schema creation. This should be generic enough that database-specific drivers don‘t need to override it.
It calls create_database to actually build a new DB from scratch if needed.
Create a new database from scratch. Some DBs, like SQLite, don‘t need this. Others will need to override this and call the DB‘s "create new database" command.
Create a new database from scratch. Some DBs, like SQLite, don‘t need this. Others will need to override this and call the DB‘s "create new database" command.