]> git.openstreetmap.org Git - rails.git/blob - db/migrate/20240724194738_drop_oauth1_tables.rb
Add frozen_string_literal comments to ruby files
[rails.git] / db / migrate / 20240724194738_drop_oauth1_tables.rb
1 # frozen_string_literal: true
2
3 class DropOauth1Tables < ActiveRecord::Migration[7.1]
4   def change
5     remove_index :oauth_nonces, [:nonce, :timestamp], :unique => true
6
7     drop_table :oauth_nonces do |t|
8       t.string :nonce
9       t.integer :timestamp
10
11       t.timestamps :null => true
12     end
13
14     remove_index :oauth_tokens, :token, :unique => true
15
16     drop_table :oauth_tokens do |t|
17       t.integer :user_id
18       t.string :type, :limit => 20
19       t.integer :client_application_id
20       t.string :token, :limit => 50
21       t.string :secret, :limit => 50
22       t.timestamp :authorized_at, :invalidated_at
23       t.timestamps :null => true
24     end
25
26     remove_index :client_applications, :key, :unique => true
27
28     drop_table :client_applications do |t|
29       t.string :name
30       t.string :url
31       t.string :support_url
32       t.string :callback_url
33       t.string :key, :limit => 50
34       t.string :secret, :limit => 50
35       t.integer :user_id
36
37       t.timestamps :null => true
38     end
39   end
40 end