From 1fbd954e6a16df557be184cba6949ee0424d7680 Mon Sep 17 00:00:00 2001 From: yui-knk Date: Tue, 8 Sep 2015 20:23:20 +0900 Subject: Define `SchemaStatements#tables` as interface These 3 methods expect `ConnectionAdapters` to have `tables` method, so make it clear that `tables` method is interface. * `ConnectionAdapters::SchemaCache#prepare_tables` * `db:schema:cache:dump` task * `SchemaDumper#tables` --- .../active_record/connection_adapters/abstract/schema_statements.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'activerecord/lib/active_record/connection_adapters') diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb index 4653904105..16266b4c16 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -23,6 +23,12 @@ module ActiveRecord table_name[0...table_alias_length].tr('.', '_') end + # Returns an array of table names. + # + def tables(name = nil) + raise NotImplementedError, "tables is not implemented" + end + # Checks to see if the table +table_name+ exists on the database. # # table_exists?(:developers) -- cgit v1.2.3