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