repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20141208231955_index_subscriptions_on_feed_id_active_muted.rb | db/migrate/20141208231955_index_subscriptions_on_feed_id_active_muted.rb | class IndexSubscriptionsOnFeedIdActiveMuted < ActiveRecord::Migration[4.2]
disable_ddl_transaction!
def change
add_index :subscriptions, [:feed_id, :active, :muted], algorithm: :concurrently
add_index :subscriptions, [:feed_id, :active, :muted, :show_updates], algorithm: :concurrently, name: "index_subscri... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130820123435_add_coupons.rb | db/migrate/20130820123435_add_coupons.rb | class AddCoupons < ActiveRecord::Migration[4.2]
def change
create_table :coupons do |t|
t.references :user, index: true
t.string :coupon_code
t.string :sent_to
t.boolean :redeemed, default: false
t.timestamps
end
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130515203825_add_entry_created_at_to_unread_entries.rb | db/migrate/20130515203825_add_entry_created_at_to_unread_entries.rb | class AddEntryCreatedAtToUnreadEntries < ActiveRecord::Migration[4.2]
def change
add_column :unread_entries, :entry_created_at, :datetime
add_index :unread_entries, :entry_created_at
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20121125043913_add_default_value_to_import_default.rb | db/migrate/20121125043913_add_default_value_to_import_default.rb | class AddDefaultValueToImportDefault < ActiveRecord::Migration[4.2]
def up
change_column :imports, :complete, :boolean, default: false
end
def down
change_column :imports, :complete, :boolean, default: nil
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130713170339_drop_entry_states.rb | db/migrate/20130713170339_drop_entry_states.rb | class DropEntryStates < ActiveRecord::Migration[4.2]
def up
drop_table :entry_states
end
def down
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20220909105317_add_fingerprint_to_entries_and_feeds.rb | db/migrate/20220909105317_add_fingerprint_to_entries_and_feeds.rb | class AddFingerprintToEntriesAndFeeds < ActiveRecord::Migration[7.0]
def change
add_column :feeds, :fingerprint, :uuid
add_column :entries, :fingerprint, :uuid
add_column :entries, :guid, :uuid
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20131025172652_add_data_to_entries.rb | db/migrate/20131025172652_add_data_to_entries.rb | class AddDataToEntries < ActiveRecord::Migration[4.2]
def change
add_column :entries, :data, :json
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20230706165756_create_discovered_feeds.rb | db/migrate/20230706165756_create_discovered_feeds.rb | class CreateDiscoveredFeeds < ActiveRecord::Migration[7.0]
def change
create_table :discovered_feeds do |t|
t.text :title
t.text :site_url
t.text :feed_url
t.text :host
t.datetime :verified_at
t.timestamps
end
add_index :discovered_feeds, [:site_url, :feed_url], unique... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130403032846_add_hstore_settings_to_users.rb | db/migrate/20130403032846_add_hstore_settings_to_users.rb | class AddHstoreSettingsToUsers < ActiveRecord::Migration[4.2]
def change
add_column :users, :settings, :hstore
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130327174832_add_old_public_id_to_entries.rb | db/migrate/20130327174832_add_old_public_id_to_entries.rb | class AddOldPublicIdToEntries < ActiveRecord::Migration[4.2]
def change
add_column :entries, :old_public_id, :string
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20140326173619_remove_created_at_index_from_entries.rb | db/migrate/20140326173619_remove_created_at_index_from_entries.rb | class RemoveCreatedAtIndexFromEntries < ActiveRecord::Migration[4.2]
def change
remove_index :entries, :created_at
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20190225200600_drop_unread_entries.rb | db/migrate/20190225200600_drop_unread_entries.rb | class DropUnreadEntries < ActiveRecord::Migration[5.1]
def change
# drop_table(:unread_entries, force: true) if ActiveRecord::Base.connection.tables.include?("unread_entries")
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20220208094739_add_uuid_to_authentication_tokens.rb | db/migrate/20220208094739_add_uuid_to_authentication_tokens.rb | class AddUuidToAuthenticationTokens < ActiveRecord::Migration[7.0]
disable_ddl_transaction!
def up
execute <<~SQL
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
SQL
add_column :authentication_tokens, :uuid, :uuid, default: -> { "uuid_generate_v4()" }, null: false
add_index :authentication_tokens,... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130408045541_add_starred_token_to_user.rb | db/migrate/20130408045541_add_starred_token_to_user.rb | class AddStarredTokenToUser < ActiveRecord::Migration[4.2]
def up
add_column :users, :starred_token, :string
add_index :users, :starred_token, unique: true
User.reset_column_information
User.find_each do |user|
user.generate_token(:starred_token)
user.save
end
end
def down
rem... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20200103141053_create_newsletter_senders.rb | db/migrate/20200103141053_create_newsletter_senders.rb | class CreateNewsletterSenders < ActiveRecord::Migration[6.0]
def change
create_table :newsletter_senders do |t|
t.references :feed, foreign_key: true, null: false, index: {unique: true}
t.boolean :active, null: false, default: true
t.text :token, null: false, index: true
t.text :full_token... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20121124070242_add_attachment_file_to_imports.rb | db/migrate/20121124070242_add_attachment_file_to_imports.rb | class AddAttachmentFileToImports < ActiveRecord::Migration[4.2]
def self.up
change_table :imports do |t|
t.has_attached_file :file
end
end
def self.down
drop_attached_file :imports, :file
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20151011143618_add_image_url_to_entries.rb | db/migrate/20151011143618_add_image_url_to_entries.rb | class AddImageUrlToEntries < ActiveRecord::Migration[4.2]
def change
add_column :entries, :image_url, :text
add_column :entries, :processed_image_url, :text
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20220128221704_add_standalone_request_at_to_feed.rb | db/migrate/20220128221704_add_standalone_request_at_to_feed.rb | class AddStandaloneRequestAtToFeed < ActiveRecord::Migration[7.0]
disable_ddl_transaction!
def change
add_column :feeds, :standalone_request_at, :datetime
add_index :feeds, :standalone_request_at, where: "standalone_request_at IS NOT NULL", order: {standalone_request_at: :desc}, algorithm: :concurrently
... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20131105035905_update_actions_all_feeds_default.rb | db/migrate/20131105035905_update_actions_all_feeds_default.rb | class UpdateActionsAllFeedsDefault < ActiveRecord::Migration[4.2]
def change
change_column :actions, :all_feeds, :boolean, default: false
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20220302204713_create_account_migration_items.rb | db/migrate/20220302204713_create_account_migration_items.rb | class CreateAccountMigrationItems < ActiveRecord::Migration[7.0]
def change
create_table :account_migration_items do |t|
t.references :account_migration, foreign_key: false, null: false
t.bigint :status, null: false, default: 0
t.jsonb :data, default: {}
t.text :message
t.timestamps... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20131205095630_remove_updated_content_from_entries.rb | db/migrate/20131205095630_remove_updated_content_from_entries.rb | class RemoveUpdatedContentFromEntries < ActiveRecord::Migration[4.2]
def change
remove_column :entries, :updated_content
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20121010042043_devise_create_users.rb | db/migrate/20121010042043_devise_create_users.rb | class DeviseCreateUsers < ActiveRecord::Migration[4.2]
def change
create_table(:users) do |t|
## Database authenticatable
t.string :email, null: false, default: ""
t.string :encrypted_password, null: false, default: ""
## Recoverable
t.string :reset_password_token
t.datetime :... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20230101160218_add_provider_parent_id_to_entries.rb | db/migrate/20230101160218_add_provider_parent_id_to_entries.rb | class AddProviderParentIdToEntries < ActiveRecord::Migration[7.0]
def change
add_column :entries, :provider_parent_id, :text
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20131024055750_add_push_to_subscriptions.rb | db/migrate/20131024055750_add_push_to_subscriptions.rb | class AddPushToSubscriptions < ActiveRecord::Migration[4.2]
def change
add_column :subscriptions, :push, :boolean, default: false
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130616031049_add_item_type_to_import_items.rb | db/migrate/20130616031049_add_item_type_to_import_items.rb | class AddItemTypeToImportItems < ActiveRecord::Migration[4.2]
def change
add_column :import_items, :item_type, :string
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130124151206_add_event_id_to_billing_events.rb | db/migrate/20130124151206_add_event_id_to_billing_events.rb | class AddEventIdToBillingEvents < ActiveRecord::Migration[4.2]
def change
add_column :billing_events, :event_id, :string
add_index :billing_events, :event_id, unique: true
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20190710112843_add_page_token_to_users.rb | db/migrate/20190710112843_add_page_token_to_users.rb | class AddPageTokenToUsers < ActiveRecord::Migration[5.1]
disable_ddl_transaction!
def up
add_column :users, :page_token, :string
add_index :users, :page_token, unique: true, algorithm: :concurrently
User.reset_column_information
User.find_each do |user|
user.generate_token(:page_token)
... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20190725121939_add_foreign_key_constraint_to_active_storage_attachments_for_blob_id.active_storage.rb | db/migrate/20190725121939_add_foreign_key_constraint_to_active_storage_attachments_for_blob_id.active_storage.rb | # This migration comes from active_storage (originally 20180723000244)
class AddForeignKeyConstraintToActiveStorageAttachmentsForBlobId < ActiveRecord::Migration[6.0]
def up
return if foreign_key_exists?(:active_storage_attachments, column: :blob_id)
if table_exists?(:active_storage_blobs)
add_foreign_... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130701042440_add_price_tier_to_plans.rb | db/migrate/20130701042440_add_price_tier_to_plans.rb | class AddPriceTierToPlans < ActiveRecord::Migration[4.2]
def change
add_column :plans, :price_tier, :integer
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20210102005228_add_settings_to_feed.rb | db/migrate/20210102005228_add_settings_to_feed.rb | class AddSettingsToFeed < ActiveRecord::Migration[6.0]
def change
add_column :feeds, :settings, :jsonb
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20141117192421_create_updated_entries.rb | db/migrate/20141117192421_create_updated_entries.rb | class CreateUpdatedEntries < ActiveRecord::Migration[4.2]
def change
create_table :updated_entries, id: :bigserial do |t|
t.belongs_to :user, index: true
t.belongs_to :entry, index: true
t.belongs_to :feed, index: true
t.datetime :published
t.datetime :updated
t.timestamps
... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20150425060924_add_tag_ids_and_action_type_to_actions.rb | db/migrate/20150425060924_add_tag_ids_and_action_type_to_actions.rb | class AddTagIdsAndActionTypeToActions < ActiveRecord::Migration[4.2]
def change
add_column :actions, :tag_ids, :integer, array: true, default: []
add_column :actions, :action_type, :integer, default: 0
add_column :actions, :computed_feed_ids, :integer, array: true, default: []
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20141110225053_remove_id_from_unread_entries.rb | db/migrate/20141110225053_remove_id_from_unread_entries.rb | class RemoveIdFromUnreadEntries < ActiveRecord::Migration[4.2]
def change
remove_column :unread_entries, :id
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20180607200816_add_url_new_to_favicon.rb | db/migrate/20180607200816_add_url_new_to_favicon.rb | class AddUrlNewToFavicon < ActiveRecord::Migration[5.1]
def change
add_column :favicons, :url_new, :text
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20240502090914_create_images.rb | db/migrate/20240502090914_create_images.rb | class CreateImages < ActiveRecord::Migration[7.1]
def change
create_table :images do |t|
t.bigint :provider, null: false
t.text :provider_id, null: false
t.text :url, null: false
t.uuid :url_fingerprint, null: false
t.text :storage_url, nu... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130124141157_create_billing_events.rb | db/migrate/20130124141157_create_billing_events.rb | class CreateBillingEvents < ActiveRecord::Migration[4.2]
def change
create_table :billing_events do |t|
t.text :details
t.string :event_type
t.belongs_to :billable, polymorphic: true
t.timestamps
end
add_index :billing_events, :event_type
add_index :billing_events, [:billable_... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130108022157_use_text_for_feed_and_entry_properties.rb | db/migrate/20130108022157_use_text_for_feed_and_entry_properties.rb | class UseTextForFeedAndEntryProperties < ActiveRecord::Migration[4.2]
def up
change_table :entries do |t|
t.change :title, :text
t.change :url, :text
t.change :author, :text
end
change_table :feeds do |t|
t.change :feed_title, :text
t.change :feed_url, :text
t.change :s... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130420171308_drop_images_from_entries.rb | db/migrate/20130420171308_drop_images_from_entries.rb | class DropImagesFromEntries < ActiveRecord::Migration[4.2]
def change
remove_column :entries, :images
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20131101024758_add_protected_to_feeds.rb | db/migrate/20131101024758_add_protected_to_feeds.rb | class AddProtectedToFeeds < ActiveRecord::Migration[4.2]
def change
add_column :feeds, :protected, :boolean, default: false
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20150713230754_create_suggested_categories.rb | db/migrate/20150713230754_create_suggested_categories.rb | class CreateSuggestedCategories < ActiveRecord::Migration[4.2]
def change
create_table :suggested_categories do |t|
t.text :name
t.timestamps
end
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20131228183918_add_source_to_entries.rb | db/migrate/20131228183918_add_source_to_entries.rb | class AddSourceToEntries < ActiveRecord::Migration[4.2]
def change
add_column :entries, :source, :text
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20220204142012_add_queue.rb | db/migrate/20220204142012_add_queue.rb | class AddQueue < ActiveRecord::Migration[7.0]
def change
create_table :queued_entries do |t|
t.references :user, null: false, index: true, foreign_key: { on_delete: :cascade }
t.references :entry, null: false, foreign_key: { on_delete: :cascade }
t.references :feed, null: false
t.bigint :o... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20200113101112_add_active_to_authentication_tokens.rb | db/migrate/20200113101112_add_active_to_authentication_tokens.rb | class AddActiveToAuthenticationTokens < ActiveRecord::Migration[6.0]
disable_ddl_transaction!
def change
add_column :authentication_tokens, :active, :boolean, default: true, null: false
add_index :authentication_tokens, [:purpose, :token, :active], algorithm: :concurrently
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20150817230441_add_response_to_in_app_purchases.rb | db/migrate/20150817230441_add_response_to_in_app_purchases.rb | class AddResponseToInAppPurchases < ActiveRecord::Migration[4.2]
def change
add_column :in_app_purchases, :response, :json
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20121012074155_create_entries.rb | db/migrate/20121012074155_create_entries.rb | class CreateEntries < ActiveRecord::Migration[4.2]
def change
create_table :entries do |t|
t.integer :feed_id
t.string :entry_id
t.string :title
t.string :url
t.string :author
t.text :summary
t.text :content
t.datetime :published
t.datetime :updated
t.t... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20121019231945_add_selected_feed_to_users.rb | db/migrate/20121019231945_add_selected_feed_to_users.rb | class AddSelectedFeedToUsers < ActiveRecord::Migration[4.2]
def change
add_column :users, :selected_feed, :integer
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20220715154209_add_active_to_devices.rb | db/migrate/20220715154209_add_active_to_devices.rb | class AddActiveToDevices < ActiveRecord::Migration[7.0]
def change
add_column :devices, :active, :bool, default: true
change_column_null :devices, :user_id, false
change_column_null :devices, :token, false
change_column_null :devices, :device_type, false
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20170812121620_create_recently_played_entries.rb | db/migrate/20170812121620_create_recently_played_entries.rb | class CreateRecentlyPlayedEntries < ActiveRecord::Migration[5.0]
def change
create_table :recently_played_entries do |t|
t.references :user, foreign_key: false, null: false, index: true
t.references :entry, foreign_key: false, null: false
t.integer :progress, null: false, default: 0
t.inte... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20131106060451_move_push_notifications_to_actions.rb | db/migrate/20131106060451_move_push_notifications_to_actions.rb | class MovePushNotificationsToActions < ActiveRecord::Migration[4.2]
def up
User.find_each do |user|
feed_ids = user.subscriptions.where(push: true).pluck(:feed_id)
if feed_ids.any?
user.actions.create(feed_ids: feed_ids, actions: ["send_push_notification"])
end
rescue Exception
e... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20200708130351_create_twitter_users.rb | db/migrate/20200708130351_create_twitter_users.rb | class CreateTwitterUsers < ActiveRecord::Migration[6.0]
def change
create_table :twitter_users do |t|
t.text :screen_name, null: false
t.jsonb :data, null: false
t.timestamps
end
add_index :twitter_users, "lower(screen_name)", unique: true
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20131011204115_create_saved_searches.rb | db/migrate/20131011204115_create_saved_searches.rb | class CreateSavedSearches < ActiveRecord::Migration[4.2]
def change
create_table :saved_searches do |t|
t.references :user, index: true, null: false
t.text :name, null: false
t.text :query
t.timestamps
end
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20250117094633_drop_images.rb | db/migrate/20250117094633_drop_images.rb | class DropImages < ActiveRecord::Migration[7.2]
def change
drop_table :images
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130429152153_add_missing_inbound_email_tokens.rb | db/migrate/20130429152153_add_missing_inbound_email_tokens.rb | class AddMissingInboundEmailTokens < ActiveRecord::Migration[4.2]
def change
User.where(inbound_email_token: nil).find_each do |user|
user.generate_token(:inbound_email_token)
user.save
end
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20121220044158_add_settings_to_users.rb | db/migrate/20121220044158_add_settings_to_users.rb | class AddSettingsToUsers < ActiveRecord::Migration[4.2]
def change
add_column :users, :settings, :text
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20220804145624_add_original_user_id_to_deleted_users.rb | db/migrate/20220804145624_add_original_user_id_to_deleted_users.rb | class AddOriginalUserIdToDeletedUsers < ActiveRecord::Migration[7.0]
def change
add_column :deleted_users, :original_user_id, :bigint
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20140321203637_index_entries_on_created_at.rb | db/migrate/20140321203637_index_entries_on_created_at.rb | class IndexEntriesOnCreatedAt < ActiveRecord::Migration[4.2]
disable_ddl_transaction!
def change
add_index :entries, :created_at, order: {created_at: :desc}, algorithm: :concurrently
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20221004142045_add_filename_to_imports.rb | db/migrate/20221004142045_add_filename_to_imports.rb | class AddFilenameToImports < ActiveRecord::Migration[7.0]
def change
add_column :imports, :filename, :text
add_column :import_items, :error, :jsonb
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130121162825_add_plan_id_to_users.rb | db/migrate/20130121162825_add_plan_id_to_users.rb | class AddPlanIdToUsers < ActiveRecord::Migration[4.2]
def change
add_column :users, :plan_id, :integer
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20190516210058_change_import_items_status_default.rb | db/migrate/20190516210058_change_import_items_status_default.rb | class ChangeImportItemsStatusDefault < ActiveRecord::Migration[5.1]
def up
change_column_default(:import_items, :status, 0)
end
def down
change_column_default(:import_items, :status, 1)
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130101205608_add_entry_id_and_public_id_to_entries.rb | db/migrate/20130101205608_add_entry_id_and_public_id_to_entries.rb | class AddEntryIdAndPublicIdToEntries < ActiveRecord::Migration[4.2]
def change
add_column :entries, :entry_id, :string
add_column :entries, :public_id, :string
add_index :entries, :public_id, unique: true
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20170427001830_add_price_tier_to_user.rb | db/migrate/20170427001830_add_price_tier_to_user.rb | class AddPriceTierToUser < ActiveRecord::Migration[5.0]
def change
add_column :users, :price_tier, :integer
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20161110045909_add_url_to_favicons.rb | db/migrate/20161110045909_add_url_to_favicons.rb | class AddUrlToFavicons < ActiveRecord::Migration[5.0]
def change
add_column :favicons, :url, :string
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20141202203934_add_show_updates_and_muted_to_subscriptions.rb | db/migrate/20141202203934_add_show_updates_and_muted_to_subscriptions.rb | class AddShowUpdatesAndMutedToSubscriptions < ActiveRecord::Migration[4.2]
def up
add_column :subscriptions, :show_updates, :boolean
change_column_default(:subscriptions, :show_updates, true)
add_column :subscriptions, :muted, :boolean
change_column_default(:subscriptions, :muted, false)
Subscri... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20221219141006_create_oauth_servers.rb | db/migrate/20221219141006_create_oauth_servers.rb | class CreateOauthServers < ActiveRecord::Migration[7.0]
def change
create_table :oauth_servers do |t|
t.text :host, null: false, index: {unique: true}
t.jsonb :data, null: false, default: {}
t.timestamps
end
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20140416025157_create_supported_sharing_services.rb | db/migrate/20140416025157_create_supported_sharing_services.rb | class CreateSupportedSharingServices < ActiveRecord::Migration[4.2]
def change
create_table :supported_sharing_services do |t|
t.belongs_to :user, index: true, null: false
t.string :service_id, null: false
t.hstore :settings
t.json :service_options
t.timestamps
end
add_index... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20150707202540_create_in_app_purchases.rb | db/migrate/20150707202540_create_in_app_purchases.rb | class CreateInAppPurchases < ActiveRecord::Migration[4.2]
def change
create_table :in_app_purchases do |t|
t.belongs_to :user, index: true
t.text :transaction_id
t.datetime :purchase_date
t.json :receipt
t.timestamps
end
add_index :in_app_purchases, :transaction_id, unique: t... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20180714072623_remove_recently_played_entries_count_index_from_entries.rb | db/migrate/20180714072623_remove_recently_played_entries_count_index_from_entries.rb | class RemoveRecentlyPlayedEntriesCountIndexFromEntries < ActiveRecord::Migration[5.1]
disable_ddl_transaction!
def up
remove_index :entries, :recently_played_entries_count
end
def down
add_index :entries, :recently_played_entries_count, algorithm: :concurrently
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20210601200027_add_main_tweet_id_to_entries.rb | db/migrate/20210601200027_add_main_tweet_id_to_entries.rb | class AddMainTweetIdToEntries < ActiveRecord::Migration[6.1]
disable_ddl_transaction!
def change
add_column :entries, :main_tweet_id, :text
add_index :entries, :main_tweet_id, where: "main_tweet_id IS NOT NULL", algorithm: :concurrently
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20140505062817_create_deleted_users.rb | db/migrate/20140505062817_create_deleted_users.rb | class CreateDeletedUsers < ActiveRecord::Migration[4.2]
def change
create_table :deleted_users do |t|
t.text :email
t.text :customer_id
t.timestamps
end
add_index :deleted_users, :email
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130227065820_add_account_stuff_to_users.rb | db/migrate/20130227065820_add_account_stuff_to_users.rb | class AddAccountStuffToUsers < ActiveRecord::Migration[4.2]
def change
add_column :users, :auth_token, :string
add_column :users, :password_reset_token, :string
add_column :users, :password_reset_sent_at, :datetime
add_index :users, :email, unique: true
add_index :users, :customer_id, unique: tru... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130228150343_drop_acts_as_taggable_on_migration.rb | db/migrate/20130228150343_drop_acts_as_taggable_on_migration.rb | class DropActsAsTaggableOnMigration < ActiveRecord::Migration[4.2]
def up
drop_table :taggings
drop_table :tags
end
def down
create_table :tags do |t|
t.string :name
end
create_table :taggings do |t|
t.references :tag
t.references :taggable, polymorphic: true
t.referen... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20121109200937_remove_selected_feed_and_selected_entry_from_users.rb | db/migrate/20121109200937_remove_selected_feed_and_selected_entry_from_users.rb | class RemoveSelectedFeedAndSelectedEntryFromUsers < ActiveRecord::Migration[4.2]
def up
remove_column :users, :selected_feed
remove_column :users, :selected_entry
end
def down
add_column :users, :selected_feed, :integer
add_column :users, :selected_entry, :integer
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20150520213553_index_devices_on_lowercase_token.rb | db/migrate/20150520213553_index_devices_on_lowercase_token.rb | class IndexDevicesOnLowercaseToken < ActiveRecord::Migration[4.2]
disable_ddl_transaction!
def up
remove_index :devices, :token
execute "CREATE UNIQUE INDEX CONCURRENTLY index_devices_on_lower_tokens ON devices (LOWER(token))"
end
def down
execute "DROP INDEX index_devices_on_lower_tokens"
add... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130407192646_remove_unused_indexes.rb | db/migrate/20130407192646_remove_unused_indexes.rb | class RemoveUnusedIndexes < ActiveRecord::Migration[4.2]
def change
remove_index :entry_states, :starred
remove_index :entry_states, :read
remove_index :taggings, :feed_id
remove_index :billing_events, :event_type
remove_index :entries, :published
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130203182936_add_state_timestamps_to_entry_states.rb | db/migrate/20130203182936_add_state_timestamps_to_entry_states.rb | class AddStateTimestampsToEntryStates < ActiveRecord::Migration[4.2]
def change
add_column :entry_states, :starred_at, :datetime
add_column :entry_states, :read_at, :datetime
add_column :entry_states, :starred_updated_at, :datetime
add_column :entry_states, :read_updated_at, :datetime
add_index ... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20221222204921_add_provider_and_provider_id_to_entries.rb | db/migrate/20221222204921_add_provider_and_provider_id_to_entries.rb | class AddProviderAndProviderIdToEntries < ActiveRecord::Migration[7.0]
disable_ddl_transaction!
def change
add_column :entries, :provider, :bigint
add_column :entries, :provider_id, :text
add_index :entries, [:provider, :provider_id], where: "provider IS NOT NULL AND provider_id IS NOT NULL", algorithm... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20121106123418_create_settings.rb | db/migrate/20121106123418_create_settings.rb | class CreateSettings < ActiveRecord::Migration[4.2]
def self.up
create_table :settings do |t|
t.string :var, null: false
t.text :value, null: true
t.integer :thing_id, null: true
t.string :thing_type, limit: 30, null: true
t.timestamps
end
add_index :settings, [:thing_type, ... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130204000143_add_timestamp_user_index_to_entry_states.rb | db/migrate/20130204000143_add_timestamp_user_index_to_entry_states.rb | class AddTimestampUserIndexToEntryStates < ActiveRecord::Migration[4.2]
def change
add_index :entry_states, [:user_id, :read_updated_at, :starred_updated_at], name: "index_entry_states_on_user_and_state_timestamps"
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130619222820_add_view_inline_to_subscriptions.rb | db/migrate/20130619222820_add_view_inline_to_subscriptions.rb | class AddViewInlineToSubscriptions < ActiveRecord::Migration[4.2]
def change
add_column :subscriptions, :view_inline, :boolean, default: false
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20200102115516_create_authentication_tokens.rb | db/migrate/20200102115516_create_authentication_tokens.rb | class CreateAuthenticationTokens < ActiveRecord::Migration[6.0]
def change
create_table :authentication_tokens do |t|
t.references :user, foreign_key: true, null: false
t.text :token, null: false
t.integer :purpose, null: false
t.jsonb :data, default: {}
t.timestamps
end
add_... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20220505093250_create_attribute_changes.rb | db/migrate/20220505093250_create_attribute_changes.rb | class CreateAttributeChanges < ActiveRecord::Migration[7.0]
def change
create_table :attribute_changes do |t|
t.belongs_to :trackable, polymorphic: true, index: false
t.text :name
t.timestamps
end
add_index :attribute_changes, [:trackable_id, :trackable_type, :name], unique: true, name: ... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130121161637_add_billing_info_to_users.rb | db/migrate/20130121161637_add_billing_info_to_users.rb | class AddBillingInfoToUsers < ActiveRecord::Migration[4.2]
def change
add_column :users, :customer_id, :string
add_column :users, :last_4_digits, :string
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20180717001048_remove_url_new_from_favicons.rb | db/migrate/20180717001048_remove_url_new_from_favicons.rb | class RemoveUrlNewFromFavicons < ActiveRecord::Migration[5.1]
def change
remove_column :favicons, :url_new, :text
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20180102071024_add_options_to_subscriptions.rb | db/migrate/20180102071024_add_options_to_subscriptions.rb | class AddOptionsToSubscriptions < ActiveRecord::Migration[5.1]
disable_ddl_transaction!
def up
add_column :subscriptions, :show_retweets, :boolean
change_column_default(:subscriptions, :show_retweets, true)
add_index :subscriptions, :show_retweets, algorithm: :concurrently
add_column :subscription... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130126044222_add_suspended_to_users.rb | db/migrate/20130126044222_add_suspended_to_users.rb | class AddSuspendedToUsers < ActiveRecord::Migration[4.2]
def change
add_column :users, :suspended, :boolean, default: false
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20131101063139_create_actions.rb | db/migrate/20131101063139_create_actions.rb | class CreateActions < ActiveRecord::Migration[4.2]
def change
create_table :actions do |t|
t.belongs_to :user, index: true
t.text :query
t.text :actions, array: true, default: []
t.text :feed_ids, array: true, default: []
t.boolean :all_feeds, default: true
t.timestamps
en... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20220806155622_remove_feed_id_index_from_entries.rb | db/migrate/20220806155622_remove_feed_id_index_from_entries.rb | class RemoveFeedIdIndexFromEntries < ActiveRecord::Migration[7.0]
disable_ddl_transaction!
def up
remove_index :entries, :feed_id, algorithm: :concurrently
end
def down
add_index :entries, :feed_id, algorithm: :concurrently
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20121012075009_create_entry_states.rb | db/migrate/20121012075009_create_entry_states.rb | class CreateEntryStates < ActiveRecord::Migration[4.2]
def change
create_table :entry_states do |t|
t.integer :user_id
t.integer :entry_id
t.boolean :read, default: false
t.boolean :starred, default: false
t.timestamps
end
add_index :entry_states, :user_id
add_index :en... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20200109204853_add_view_mode_to_subscriptions.rb | db/migrate/20200109204853_add_view_mode_to_subscriptions.rb | class AddViewModeToSubscriptions < ActiveRecord::Migration[6.0]
def up
add_column :subscriptions, :view_mode, :bigint
change_column_default(:subscriptions, :view_mode, 0)
end
def down
remove_column :subscriptions, :view_mode
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20140823091357_create_favicons.rb | db/migrate/20140823091357_create_favicons.rb | class CreateFavicons < ActiveRecord::Migration[4.2]
def change
create_table :favicons do |t|
t.text :host
t.text :favicon
t.timestamps
end
add_index :favicons, :host, unique: true
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130403032020_add_hstore_extension.rb | db/migrate/20130403032020_add_hstore_extension.rb | class AddHstoreExtension < ActiveRecord::Migration[4.2]
def up
execute "CREATE EXTENSION hstore"
end
def down
execute "DROP EXTENSION hstore"
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20150626223113_add_expires_at_to_users.rb | db/migrate/20150626223113_add_expires_at_to_users.rb | class AddExpiresAtToUsers < ActiveRecord::Migration[4.2]
def change
add_column :users, :expires_at, :datetime
add_index :users, :expires_at
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20151110044837_add_newsletter_token_to_users.rb | db/migrate/20151110044837_add_newsletter_token_to_users.rb | class AddNewsletterTokenToUsers < ActiveRecord::Migration[4.2]
def up
add_column :users, :newsletter_token, :string
add_index :users, :newsletter_token, unique: true
end
def down
remove_index :users, :newsletter_token
remove_column :users, :newsletter_token, :string
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20231017104043_add_service_name_to_active_storage_blobs.active_storage.rb | db/migrate/20231017104043_add_service_name_to_active_storage_blobs.active_storage.rb | # This migration comes from active_storage (originally 20190112182829)
class AddServiceNameToActiveStorageBlobs < ActiveRecord::Migration[6.0]
def up
return unless table_exists?(:active_storage_blobs)
unless column_exists?(:active_storage_blobs, :service_name)
add_column :active_storage_blobs, :service... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20131017013531_add_active_to_subscriptions.rb | db/migrate/20131017013531_add_active_to_subscriptions.rb | class AddActiveToSubscriptions < ActiveRecord::Migration[4.2]
def change
add_column :subscriptions, :active, :boolean, default: true
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20121013082327_add_feed_id_to_entry_states.rb | db/migrate/20121013082327_add_feed_id_to_entry_states.rb | class AddFeedIdToEntryStates < ActiveRecord::Migration[4.2]
def up
add_column :entry_states, :feed_id, :integer
add_index :entry_states, :feed_id
EntryState.find_each do |entry_state|
entry_state.feed_id = entry_state.entry.feed_id
entry_state.save!
end
end
def down
remove_column... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130429063608_add_inbound_email_token_to_users.rb | db/migrate/20130429063608_add_inbound_email_token_to_users.rb | class AddInboundEmailTokenToUsers < ActiveRecord::Migration[4.2]
def up
add_column :users, :inbound_email_token, :string
add_index :users, :inbound_email_token, unique: true
User.reset_column_information
User.find_each do |user|
user.generate_token(:inbound_email_token)
user.save
end
... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130517164043_remove_entry_created_at_index_from_unread_entries.rb | db/migrate/20130517164043_remove_entry_created_at_index_from_unread_entries.rb | class RemoveEntryCreatedAtIndexFromUnreadEntries < ActiveRecord::Migration[4.2]
def change
remove_index :unread_entries, :entry_created_at
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20130520012402_add_title_to_subscriptions.rb | db/migrate/20130520012402_add_title_to_subscriptions.rb | class AddTitleToSubscriptions < ActiveRecord::Migration[4.2]
def change
add_column :subscriptions, :title, :text
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/db/migrate/20180106031725_add_thread_id_to_entries.rb | db/migrate/20180106031725_add_thread_id_to_entries.rb | class AddThreadIdToEntries < ActiveRecord::Migration[5.1]
disable_ddl_transaction!
def change
add_column :entries, :thread_id, :bigint
add_index :entries, :thread_id, where: "thread_id IS NOT NULL", algorithm: :concurrently
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.