cauta-desert 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,8 +3,11 @@ ActiveRecord::ConnectionAdapters::SchemaStatements.module_eval do
|
|
3
3
|
initialize_schema_migrations_table_without_plugins
|
4
4
|
|
5
5
|
begin
|
6
|
-
|
7
|
-
|
6
|
+
psm_table = ActiveRecord::Migrator.schema_migrations_table_name
|
7
|
+
unless ActiveRecord::Base.connection.table_exists?(psm_table)
|
8
|
+
execute "CREATE TABLE #{psm_table} (plugin_name #{type_to_sql(:string)}, version #{type_to_sql(:string)})"
|
9
|
+
end
|
10
|
+
plugins_and_versions = select_all("SELECT plugin_name, version from #{psm_table}")
|
8
11
|
plugins_and_versions.each do |plugin_data|
|
9
12
|
plugin_name, version = plugin_data["plugin_name"], plugin_data["version"]
|
10
13
|
plugin = Desert::Manager.find_plugin(plugin_name)
|
@@ -30,4 +33,4 @@ ActiveRecord::ConnectionAdapters::SchemaStatements.module_eval do
|
|
30
33
|
end
|
31
34
|
end
|
32
35
|
alias_method_chain :initialize_schema_migrations_table, :plugins
|
33
|
-
end
|
36
|
+
end
|