activerecord-virgodb-adapter 0.1.1
“Lets any Rails app write real ActiveRecord::Migration subclasses against a virgodb manifest, picked up by `rails db:migrate` the same way S…”
Ruby parses JSON dataRuby serializes formatted JSON
SHA-256968cda33d35a9baa3f25b0a90631f1bbb9ad1c61fb68082839d653bfaa01eb9c
MaleculeH₂(Db₂F)
Evidence
16:8… e ConnectionAdapters
17 # ActiveRecord adapter for virgodb migrations -- lets any Rails app
18 # define and evolve a virgodb table's schema the same way it already
19 # does for SQLite (bin/rails db:migrate) and ClickHouse (the
20 # clickhouse-activerecord gem): real ActiveRecord::Migration subclasses,
21 # raw type strings, picked up by `rails d …
169:13… re_schema_versions_table!
170
171 current_json = select_value("SELECT columns FROM schema_versions WHERE table_name = #{quote(table_name)} ORDER BY version DESC LIMIT 1")
172 current_cols = current_json ? JSON.parse(current_json) : []
173
174 new_col = { "name" => column_name.to_s, "virgodb_type" => type.to_s, "nullable" => options[:null] != …
295:115… b/migrate_virgodb_*/ for the rest"
296 pretty_columns = JSON.pretty_generate(JSON.parse(latest["columns"]))
297 f.puts(
298 "INSERT INTO \"schema_versions\" (id, table_name, version, columns, applied_ …
332
333 "#{comment}\n#{statement_start}"
334 end
335 File.write(filename, content)
336 end
337
338 # `SQLite3Adapter#structure_dump`'s raw `SELECT sql FROM sqlite_master`
339 # path (used w …
No evidence locations were recorded for this file. Raw result