Skip to content

Commit

Permalink
db schema change
Browse files Browse the repository at this point in the history
  • Loading branch information
zwolf committed Nov 29, 2023
1 parent 840a9c4 commit 1a7ef04
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
15 changes: 15 additions & 0 deletions db/migrate/20231107211623_add_confirmed_to_users.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

class AddConfirmedToUsers < ActiveRecord::Migration
def up
execute <<-SQL
ALTER FOREIGN TABLE users ADD COLUMN confirmed_at TIMESTAMP DEFAULT NULL
SQL
end

def down
execute <<-SQL
ALTER FOREIGN TABLE users DROP COLUMN IF EXISTS confirmed_at;
SQL
end
end
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20180518132406) do
ActiveRecord::Schema.define(version: 20231107211623) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Expand Down
6 changes: 4 additions & 2 deletions lib/tasks/db.rake
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ namespace :panoptes do
zooniverse_id varchar(255),
credited_name varchar(255),
admin bool,
banned bool
banned bool,
confirmed_at timestamp(6)
) server panoptes;
create foreign table if not exists oauth_access_tokens (
Expand Down Expand Up @@ -232,7 +233,8 @@ namespace :panoptes do
banned boolean default false not null,
migrated boolean default false,
valid_email boolean default true not null,
uploaded_subjects_count integer default 0
uploaded_subjects_count integer default 0,
confirmed_at timestamp(6) without time zone default null
);
drop table if exists oauth_access_tokens;
Expand Down

0 comments on commit 1a7ef04

Please sign in to comment.