def create_model_storage(model)
name = self.name
properties = model.properties_with_subclasses(name)
return false if storage_exists?(model.storage_name(name))
return false if properties.empty?
with_connection do |connection|
statements = [ create_table_statement(connection, model, properties) ]
statements.concat(create_index_statements(model))
statements.concat(create_unique_index_statements(model))
statements.each do |statement|
command = connection.create_command(statement)
command.execute_non_query
end
end
true
end