Class: DatabaseSchemaOwnership::Parser::SqlParser
- Inherits:
-
DatabaseSchemaOwnership::Parser
- Object
- DatabaseSchemaOwnership::Parser
- DatabaseSchemaOwnership::Parser::SqlParser
- Defined in:
- lib/database_schema_ownership/parser/sql_parser.rb
Overview
:nodoc:
Instance Attribute Summary
Attributes inherited from DatabaseSchemaOwnership::Parser
Instance Method Summary collapse
Methods inherited from DatabaseSchemaOwnership::Parser
for, #initialize, #parse, #schema
Constructor Details
This class inherits a constructor from DatabaseSchemaOwnership::Parser
Instance Method Details
#rules ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/database_schema_ownership/parser/sql_parser.rb', line 6 def rules [ # ActiveRecord 8 /(CREATE TABLE IF NOT EXISTS "([^"]*)"[^;]*;)/m, /(CREATE INDEX .* ON "([^"]*)"[^;]*;)/, # early versions /(CREATE TABLE (\S+) \([^;]*;)/m, /(CREATE INDEX \S+ ON (\S+) USING [^;]*;)/, /(CREATE UNIQUE INDEX \S+ ON (\S+) USING [^;]*;)/, /(ALTER TABLE ONLY (\S+)[^;]*;)/m ] end |