Skip to content

Commit

Permalink
SQLite does not have a native UUID type
Browse files Browse the repository at this point in the history
  • Loading branch information
julik committed May 20, 2024
1 parent 8b25ba5 commit 96d0dcc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pecorino/adapters/sqlite_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def prune
end

def create_tables(active_record_schema)
active_record_schema.create_table :pecorino_leaky_buckets, id: :uuid do |t|
active_record_schema.create_table :pecorino_leaky_buckets do |t|
t.string :key, null: false
t.float :level, null: false
t.datetime :last_touched_at, null: false
Expand All @@ -212,7 +212,7 @@ def create_tables(active_record_schema)
active_record_schema.add_index :pecorino_leaky_buckets, [:key], unique: true
active_record_schema.add_index :pecorino_leaky_buckets, [:may_be_deleted_after]

active_record_schema.create_table :pecorino_blocks, id: :uuid do |t|
active_record_schema.create_table :pecorino_blocks do |t|
t.string :key, null: false
t.datetime :blocked_until, null: false
end
Expand Down

0 comments on commit 96d0dcc

Please sign in to comment.