45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# File 'lib/active_record/tasks/sqlite_database_tasks.rb', line 45
def structure_dump(filename, )
args = []
args.concat(Array()) if
args << db_config.database
ignore_tables = ActiveRecord::SchemaDumper.ignore_tables
if ignore_tables.any?
condition = ignore_tables.map { |table| connection.quote(table) }.join(", ")
args << "SELECT sql FROM sqlite_master WHERE tbl_name NOT IN (#{condition}) ORDER BY tbl_name, type DESC, name"
else
args << ".schema"
end
run_cmd("sqlite3", args, filename)
end
|