Class: Doctrine
- Inherits:
-
Object
- Object
- Doctrine
- Defined in:
- lib/symfony/doctrine.rb
Class Method Summary collapse
- .clear_metadata_cache ⇒ Object
- .clear_query_cache ⇒ Object
- .clear_result_cache ⇒ Object
- .create_database ⇒ Object
- .ensure_production ⇒ Object
- .run_migrations ⇒ Object
Class Method Details
.clear_metadata_cache ⇒ Object
13 14 15 16 |
# File 'lib/symfony/doctrine.rb', line 13 def self. puts '---- Clearing Metadata Cache' fail 'Clearing metadata cache failed' unless system 'app/console doctrine:cache:clear-metadata' end |
.clear_query_cache ⇒ Object
18 19 20 21 |
# File 'lib/symfony/doctrine.rb', line 18 def self.clear_query_cache puts '---- Clearing Query Cache' fail 'Clearing query cache failed' unless system 'app/console doctrine:cache:clear-query' end |
.clear_result_cache ⇒ Object
23 24 25 26 |
# File 'lib/symfony/doctrine.rb', line 23 def self.clear_result_cache puts '---- Clearing Result Cache' fail 'Clearing result cache failed' unless system 'app/console doctrine:cache:clear-result' end |
.create_database ⇒ Object
3 4 5 6 |
# File 'lib/symfony/doctrine.rb', line 3 def self.create_database puts '---- Creating Database' fail 'Database creation failed!' unless /(exists|Created)/.match(`app/console doctrine:database:create`) end |
.ensure_production ⇒ Object
28 29 30 31 |
# File 'lib/symfony/doctrine.rb', line 28 def self.ensure_production puts '---- Ensuring database has production settings' fail 'Database is not in production' unless system 'app/console doctrine:ensure-production-settings' end |
.run_migrations ⇒ Object
8 9 10 11 |
# File 'lib/symfony/doctrine.rb', line 8 def self.run_migrations puts '---- Running Migrations' fail 'Migrations failed!' unless system 'app/console doctrine:migrations:migrate -n' end |