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
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20111207011813_add_email_reconfirmable.rb
db/migrate/20111207011813_add_email_reconfirmable.rb
# frozen_string_literal: true class AddEmailReconfirmable < ActiveRecord::Migration def up add_column :users, :unconfirmed_email, :string end def down remove_column :users, :unconfirmed_email, :string end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20210426172859_add_facebook_meta_tag_to_users.rb
db/migrate/20210426172859_add_facebook_meta_tag_to_users.rb
# frozen_string_literal: true class AddFacebookMetaTagToUsers < ActiveRecord::Migration[6.1] def change add_column :users, :facebook_meta_tag, :string end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20120813210705_add_autoban_flag_to_users.rb
db/migrate/20120813210705_add_autoban_flag_to_users.rb
# frozen_string_literal: true class AddAutobanFlagToUsers < ActiveRecord::Migration def change add_column :users, :autoban_flag, :boolean end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20231119190039_drop_delayed_emails.rb
db/migrate/20231119190039_drop_delayed_emails.rb
# frozen_string_literal: true class DropDelayedEmails < ActiveRecord::Migration[7.0] def up drop_table :delayed_emails end def down create_table "delayed_emails", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci" do |t| t.integer "purchase_id" t.datetime "created_at", precisi...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20220513062810_create_purchase_integration.rb
db/migrate/20220513062810_create_purchase_integration.rb
# frozen_string_literal: true class CreatePurchaseIntegration < ActiveRecord::Migration[6.1] def change create_table :purchase_integrations do |t| t.bigint :purchase_id, null: false t.bigint :integration_id, null: false t.datetime :deleted_at t.string :discord_user_id t.timestamps ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20141215091009_add_google_analytics_domains_to_users.rb
db/migrate/20141215091009_add_google_analytics_domains_to_users.rb
# frozen_string_literal: true class AddGoogleAnalyticsDomainsToUsers < ActiveRecord::Migration def change add_column :users, :google_analytics_domains, :string end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20201118135156_remove_unused_users_columns_202011.rb
db/migrate/20201118135156_remove_unused_users_columns_202011.rb
# frozen_string_literal: true class RemoveUnusedUsersColumns202011 < ActiveRecord::Migration[6.0] def up change_table :users do |t| t.remove :background_video_url t.remove :number_of_views t.remove :absorbed_to_user_id t.remove :beta t.remove :soundcloud_username t.remove :sou...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20230523203442_migrate_deleted_purchases.rb
db/migrate/20230523203442_migrate_deleted_purchases.rb
# frozen_string_literal: true class MigrateDeletedPurchases < ActiveRecord::Migration[7.0] def up return unless Rails.env.development? invalid_purchase_ids = [] eligible_purchases.find_in_batches do |batch| batch.each do |purchase| purchase.update!( purchase_state: "successful", ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20240528131710_add_position_to_bundle_products.rb
db/migrate/20240528131710_add_position_to_bundle_products.rb
# frozen_string_literal: true class AddPositionToBundleProducts < ActiveRecord::Migration[7.1] def change add_column :bundle_products, :position, :integer end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20140528153153_create_twitter_order.rb
db/migrate/20140528153153_create_twitter_order.rb
# frozen_string_literal: true class CreateTwitterOrder < ActiveRecord::Migration def change create_table :twitter_orders do |t| t.references :purchase t.string :twitter_order_id t.integer :order_timestamp, limit: 8 t.string :stripe_transaction_id t.integer :charge_amount_micro_curre...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20120305024409_change_description_to_text.rb
db/migrate/20120305024409_change_description_to_text.rb
# frozen_string_literal: true class ChangeDescriptionToText < ActiveRecord::Migration def up change_column :links, :description, :text end def down change_column :links, :description, :string end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20220830182631_remove_links_variants.rb
db/migrate/20220830182631_remove_links_variants.rb
# frozen_string_literal: true class RemoveLinksVariants < ActiveRecord::Migration[6.1] def up remove_column :links, :variants end def down add_column :links, :variants, :text, size: :medium end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20230803151649_add_flags_to_backtax_agreements.rb
db/migrate/20230803151649_add_flags_to_backtax_agreements.rb
# frozen_string_literal: true class AddFlagsToBacktaxAgreements < ActiveRecord::Migration[7.0] def change add_column :backtax_agreements, :flags, :bigint, default: 0, null: false end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20170418052305_generate_licenses_for_existing_customers.rb
db/migrate/20170418052305_generate_licenses_for_existing_customers.rb
# frozen_string_literal: true class GenerateLicensesForExistingCustomers < ActiveRecord::Migration def change # Commented out as it is taking too long to run on production. # Link.is_licensed.find_each do |link| # CreateLicensesForExistingCustomers.perform(link.id) # end end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20150921173816_add_default_value_to_licenses_flag.rb
db/migrate/20150921173816_add_default_value_to_licenses_flag.rb
# frozen_string_literal: true class AddDefaultValueToLicensesFlag < ActiveRecord::Migration def up change_column :licenses, :flags, :integer, default: 0 end def down change_column :licenses, :flags, :integer, default: nil end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20201008081331_add_tax_and_fee_to_purchase_index.rb
db/migrate/20201008081331_add_tax_and_fee_to_purchase_index.rb
# frozen_string_literal: true class AddTaxAndFeeToPurchaseIndex < ActiveRecord::Migration[6.0] def up Elasticsearch::Model.client.indices.put_mapping( index: "purchases_v2", type: "purchase", body: { purchase: { properties: { fee_cents: { type: "long" }, ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20230502015838_add_better_url_redirects_post_indexes.rb
db/migrate/20230502015838_add_better_url_redirects_post_indexes.rb
# frozen_string_literal: true class AddBetterUrlRedirectsPostIndexes < ActiveRecord::Migration[7.0] def change change_table :url_redirects, bulk: true do |t| t.index [:installment_id, :purchase_id] t.index [:installment_id, :subscription_id] t.index [:installment_id, :imported_customer_id] ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20150331074645_rename_fields_and_add_deleted_at_to_shipping_destinations.rb
db/migrate/20150331074645_rename_fields_and_add_deleted_at_to_shipping_destinations.rb
# frozen_string_literal: true class RenameFieldsAndAddDeletedAtToShippingDestinations < ActiveRecord::Migration def change add_column :shipping_destinations, :deleted_at, :datetime rename_column :shipping_destinations, :country_code2, :country_code rename_column :shipping_destinations, :standalone_rate_c...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20240507135935_add_index_on_carts_updated_at.rb
db/migrate/20240507135935_add_index_on_carts_updated_at.rb
# frozen_string_literal: true class AddIndexOnCartsUpdatedAt < ActiveRecord::Migration[7.1] def change add_index :carts, :updated_at end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20121130222908_add_cleaned_referrer_to_events.rb
db/migrate/20121130222908_add_cleaned_referrer_to_events.rb
# frozen_string_literal: true class AddCleanedReferrerToEvents < ActiveRecord::Migration def change add_column :events, :referrer_domain, :string end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20230420160357_create_refund_policies.rb
db/migrate/20230420160357_create_refund_policies.rb
# frozen_string_literal: true class CreateRefundPolicies < ActiveRecord::Migration[7.0] def change create_table :refund_policies do |t| t.references :seller, index: true, null: false t.references :product, index: { unique: true }, null: false t.string :title, null: false t.text :fine_prin...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20140120021811_add_flags_to_transcoded_videos.rb
db/migrate/20140120021811_add_flags_to_transcoded_videos.rb
# frozen_string_literal: true class AddFlagsToTranscodedVideos < ActiveRecord::Migration def change add_column :transcoded_videos, :flags, :integer, default: 0, null: false end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20231115001459_create_bundle_product_purchases.rb
db/migrate/20231115001459_create_bundle_product_purchases.rb
# frozen_string_literal: true class CreateBundleProductPurchases < ActiveRecord::Migration[7.0] def change create_table :bundle_product_purchases do |t| t.references :bundle_purchase, null: false t.references :product_purchase, null: false t.timestamps end end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20130211200121_create_ab_tests_table.rb
db/migrate/20130211200121_create_ab_tests_table.rb
# frozen_string_literal: true class CreateAbTestsTable < ActiveRecord::Migration def change create_table :ab_tests do |t| t.string :name t.string :page_name t.boolean :is_active, default: false t.datetime "deleted_at" t.timestamps end add_index "ab_tests", ["name", "page_na...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20230330021302_add_microseconds_to_products_updated_at.rb
db/migrate/20230330021302_add_microseconds_to_products_updated_at.rb
# frozen_string_literal: true class AddMicrosecondsToProductsUpdatedAt < ActiveRecord::Migration[7.0] def up change_column :links, :updated_at, :datetime, precision: 6 end def down change_column :links, :updated_at, :datetime, precision: nil end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20111122002403_create_receipts.rb
db/migrate/20111122002403_create_receipts.rb
# frozen_string_literal: true class CreateReceipts < ActiveRecord::Migration def change create_table :receipts do |t| t.text :email t.integer :purchase_id t.timestamps end end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20220413003135_add_taxonomy_id_to_product_index.rb
db/migrate/20220413003135_add_taxonomy_id_to_product_index.rb
# frozen_string_literal: true class AddTaxonomyIdToProductIndex < ActiveRecord::Migration[6.1] def up EsClient.indices.put_mapping( index: Link.index_name, body: { properties: { taxonomy_id: { type: "long" } } } ) end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20120510202146_add_stripe_card_attributes_to_credit_cards.rb
db/migrate/20120510202146_add_stripe_card_attributes_to_credit_cards.rb
# frozen_string_literal: true class AddStripeCardAttributesToCreditCards < ActiveRecord::Migration def change add_column :credit_cards, :cvc_check, :boolean add_column :credit_cards, :card_country, :string add_column :credit_cards, :stripe_card_id, :string rename_column :credit_cards, :stripe_id, :s...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20250406055017_add_index_to_followers_table.rb
db/migrate/20250406055017_add_index_to_followers_table.rb
# frozen_string_literal: true class AddIndexToFollowersTable < ActiveRecord::Migration[7.1] def change change_table :followers, bulk: true do |t| t.index [:followed_id, :confirmed_at] t.remove_index [:followed_id, :follower_user_id] t.remove_index [:follower_user_id, :followed_id] end end...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20120226203453_add_width_to_infos.rb
db/migrate/20120226203453_add_width_to_infos.rb
# frozen_string_literal: true class AddWidthToInfos < ActiveRecord::Migration def change add_column :infos, :width, :integer end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20111109220139_links_missing_attr.rb
db/migrate/20111109220139_links_missing_attr.rb
# frozen_string_literal: true class LinksMissingAttr < ActiveRecord::Migration def up add_column :links, :owner, :string add_column :links, :length_of_exclusivity, :integer add_column :links, :create_date, :integer end def down remove_column :links, :owner remove_column :links, :length_of_ex...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20111212221158_remove_unique_index_on_email.rb
db/migrate/20111212221158_remove_unique_index_on_email.rb
# frozen_string_literal: true class RemoveUniqueIndexOnEmail < ActiveRecord::Migration def up remove_index :users, :email add_index :users, :email end def down end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20220322122601_add_financing_paydown_purchase_id_to_credits.rb
db/migrate/20220322122601_add_financing_paydown_purchase_id_to_credits.rb
# frozen_string_literal: true class AddFinancingPaydownPurchaseIdToCredits < ActiveRecord::Migration[6.1] def change add_column :credits, :financing_paydown_purchase_id, :integer end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20240409134857_remove_email_from_carts.rb
db/migrate/20240409134857_remove_email_from_carts.rb
# frozen_string_literal: true class RemoveEmailFromCarts < ActiveRecord::Migration[7.1] def change remove_column :carts, :email, :string end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20210920213746_add_product_and_seller_names_to_purchase_mapping.rb
db/migrate/20210920213746_add_product_and_seller_names_to_purchase_mapping.rb
# frozen_string_literal: true class AddProductAndSellerNamesToPurchaseMapping < ActiveRecord::Migration[6.1] def up EsClient.indices.close(index: Purchase.index_name) EsClient.indices.put_settings( index: Purchase.index_name, body: { settings: { index: { analysis: { ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20240409154638_add_flags_to_charges.rb
db/migrate/20240409154638_add_flags_to_charges.rb
# frozen_string_literal: true class AddFlagsToCharges < ActiveRecord::Migration[7.1] def change add_column :charges, :flags, :bigint, default: 0, null: false end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20240803055758_drop_processed_audios.rb
db/migrate/20240803055758_drop_processed_audios.rb
# frozen_string_literal: true class DropProcessedAudios < ActiveRecord::Migration[7.1] def up drop_table :processed_audios end def down create_table "processed_audios", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t| t.integer "product_file_id" t.str...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20191121171504_add_app_type_to_device.rb
db/migrate/20191121171504_add_app_type_to_device.rb
# frozen_string_literal: true class AddAppTypeToDevice < ActiveRecord::Migration def up add_column :devices, :app_type, :string, null: false, limit: 255 change_column_default :devices, :app_type, "consumer" add_index :devices, [:app_type, :user_id] end def down remove_column :devices, :app_type ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20190910183718_backfill_installments_with_email_channel.rb
db/migrate/20190910183718_backfill_installments_with_email_channel.rb
# frozen_string_literal: true class BackfillInstallmentsWithEmailChannel < ActiveRecord::Migration def up Installment.find_in_batches do |installments| installments.each do |installment| installment.send_emails = true installment.save! end sleep(0.05) end end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20191105224621_add_index_on_users_for_twitter_o_auth_token.rb
db/migrate/20191105224621_add_index_on_users_for_twitter_o_auth_token.rb
# frozen_string_literal: true class AddIndexOnUsersForTwitterOAuthToken < ActiveRecord::Migration def up add_index :users, :twitter_oauth_token end def down remove_index :users, :twitter_oauth_token end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20221017161900_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb
db/migrate/20221017161900_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb
# frozen_string_literal: true # This migration comes from active_storage (originally 20211119233751) class RemoveNotNullOnActiveStorageBlobsChecksum < ActiveRecord::Migration[6.0] def change Alterity.disable do change_column_null(:active_storage_blobs, :checksum, true) end end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20231003201734_add_additional_fields_to_dispute_evidences.rb
db/migrate/20231003201734_add_additional_fields_to_dispute_evidences.rb
# frozen_string_literal: true class AddAdditionalFieldsToDisputeEvidences < ActiveRecord::Migration[7.0] def change change_table :dispute_evidences, bulk: true do |t| t.text :cancellation_rebuttal t.text :refund_refusal_explanation t.datetime :seller_contacted_at t.datetime :seller_submit...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20130415204908_add_flags_to_url_redirects.rb
db/migrate/20130415204908_add_flags_to_url_redirects.rb
# frozen_string_literal: true class AddFlagsToUrlRedirects < ActiveRecord::Migration def change add_column :url_redirects, :flags, :integer, default: 0, null: false end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20121115042531_remove_event_name_index_on_events.rb
db/migrate/20121115042531_remove_event_name_index_on_events.rb
# frozen_string_literal: true class RemoveEventNameIndexOnEvents < ActiveRecord::Migration def up remove_index "events", "event_type" end def down add_index "events", "event_type" end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20141203200306_create_installment_rules.rb
db/migrate/20141203200306_create_installment_rules.rb
# frozen_string_literal: true class CreateInstallmentRules < ActiveRecord::Migration def change create_table :installment_rules do |t| t.integer :installment_id t.integer :relative_delivery_time t.datetime :to_be_published_at t.integer :version, default: 0, null: false t.datetime :d...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20200514132253_add_customizable_prices_for_variants.rb
db/migrate/20200514132253_add_customizable_prices_for_variants.rb
# frozen_string_literal: true class AddCustomizablePricesForVariants < ActiveRecord::Migration[5.1] def up add_column :base_variants, :customizable_price, :boolean add_column :prices, :suggested_price_cents, :integer end def down remove_column :prices, :suggested_price_cents remove_column :base_...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20130531221758_add_index_on_email_and_followed_id_to_follows.rb
db/migrate/20130531221758_add_index_on_email_and_followed_id_to_follows.rb
# frozen_string_literal: true class AddIndexOnEmailAndFollowedIdToFollows < ActiveRecord::Migration def change add_index :follows, [:email, :followed_id] end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20191201174402_add_rental_expired_to_purchases.rb
db/migrate/20191201174402_add_rental_expired_to_purchases.rb
# frozen_string_literal: true class AddRentalExpiredToPurchases < ActiveRecord::Migration def up add_column :purchases, :rental_expired, :boolean add_index :purchases, :rental_expired end def down remove_column :purchases, :rental_expired end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20220218020712_add_slugs_to_taxonomies.rb
db/migrate/20220218020712_add_slugs_to_taxonomies.rb
# frozen_string_literal: true class AddSlugsToTaxonomies < ActiveRecord::Migration[6.1] def change add_column :taxonomies, :slug, :string end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20121115041918_add_composite_event_name_link_id_index_on_events.rb
db/migrate/20121115041918_add_composite_event_name_link_id_index_on_events.rb
# frozen_string_literal: true class AddCompositeEventNameLinkIdIndexOnEvents < ActiveRecord::Migration def up add_index "events", ["event_name", "link_id"] end def down remove_index "events", ["event_name", "link_id"] end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20250211173413_increase_utm_link_param_char_limits.rb
db/migrate/20250211173413_increase_utm_link_param_char_limits.rb
# frozen_string_literal: true class IncreaseUtmLinkParamCharLimits < ActiveRecord::Migration[7.1] def up change_table :utm_links, bulk: true do |t| t.remove_index name: "index_utm_links_on_utm_fields_and_target_resource" t.change :utm_campaign, :string, limit: 200 t.change :utm_medium, :string...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20120528234113_add_state_to_users.rb
db/migrate/20120528234113_add_state_to_users.rb
# frozen_string_literal: true class AddStateToUsers < ActiveRecord::Migration def change add_column :users, :state, :string end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20120226203552_remove_resolution_from_infos.rb
db/migrate/20120226203552_remove_resolution_from_infos.rb
# frozen_string_literal: true class RemoveResolutionFromInfos < ActiveRecord::Migration def up remove_column :infos, :resolution end def down add_column :infos, :resolution, :string end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20230503202309_add_purchase_refund_policies.rb
db/migrate/20230503202309_add_purchase_refund_policies.rb
# frozen_string_literal: true class AddPurchaseRefundPolicies < ActiveRecord::Migration[7.0] def change create_table :purchase_refund_policies do |t| t.references :purchase, index: true, null: false t.string :title, null: false t.text :fine_print t.timestamps end end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20111212220615_user_facebook_uid.rb
db/migrate/20111212220615_user_facebook_uid.rb
# frozen_string_literal: true class UserFacebookUid < ActiveRecord::Migration def up add_column :users, :facebook_uid, :string add_index :users, :facebook_uid end def down remove_index :users, :facebook_uid remove_column :users, :facebook_uid, :string end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20181031091727_create_product_reviews.rb
db/migrate/20181031091727_create_product_reviews.rb
# frozen_string_literal: true class CreateProductReviews < ActiveRecord::Migration def change create_table :product_reviews do |t| t.references :purchase, index: true, unique: true, foreign_key: { on_delete: :cascade } t.integer :rating, default: nil t.timestamps null: false end end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20230310211434_add_affiliate_basis_points_to_affiliates_links.rb
db/migrate/20230310211434_add_affiliate_basis_points_to_affiliates_links.rb
# frozen_string_literal: true class AddAffiliateBasisPointsToAffiliatesLinks < ActiveRecord::Migration[7.0] def change add_column :affiliates_links, :affiliate_basis_points, :integer end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20220518034006_create_product_cached_values.rb
db/migrate/20220518034006_create_product_cached_values.rb
# frozen_string_literal: true class CreateProductCachedValues < ActiveRecord::Migration[6.1] def change create_table :product_cached_values do |t| t.bigint :product_id, null: false, index: true t.boolean :expired, default: false, null: false, index: true t.integer :successful_sales_count ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20120516194950_remove_balance_cents_from_links.rb
db/migrate/20120516194950_remove_balance_cents_from_links.rb
# frozen_string_literal: true class RemoveBalanceCentsFromLinks < ActiveRecord::Migration def up remove_column :links, :balance_cents end def down add_column :links, :balance_cents, :integer end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20240928021005_add_past_year_fee_cents_to_products_index.rb
db/migrate/20240928021005_add_past_year_fee_cents_to_products_index.rb
# frozen_string_literal: true class AddPastYearFeeCentsToProductsIndex < ActiveRecord::Migration[7.1] def up EsClient.indices.put_mapping( index: Link.index_name, body: { properties: { past_year_fee_cents: { type: "long" }, } } ) end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20120426222453_add_tags_to_infos.rb
db/migrate/20120426222453_add_tags_to_infos.rb
# frozen_string_literal: true class AddTagsToInfos < ActiveRecord::Migration def change add_column :infos, :tags, :string end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20240616210250_remove_sales_stats_tables.rb
db/migrate/20240616210250_remove_sales_stats_tables.rb
# frozen_string_literal: true class RemoveSalesStatsTables < ActiveRecord::Migration[7.1] def up drop_table :product_daily_sales_stats, if_exists: true drop_table :product_sales_stats, if_exists: true drop_table :seller_daily_sales_stats, if_exists: true drop_table :seller_sales_stats, if_exists: tru...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20210927134712_add_json_data_to_product_files_archives.rb
db/migrate/20210927134712_add_json_data_to_product_files_archives.rb
# frozen_string_literal: true class AddJsonDataToProductFilesArchives < ActiveRecord::Migration[6.1] def change add_column :product_files_archives, :json_data, :text end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20250925161102_add_paused_to_upsells.rb
db/migrate/20250925161102_add_paused_to_upsells.rb
# frozen_string_literal: true class AddPausedToUpsells < ActiveRecord::Migration[7.1] def change add_column :upsells, :paused, :boolean, default: false, null: false end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20150804000000_add_country_to_merchant_accounts.rb
db/migrate/20150804000000_add_country_to_merchant_accounts.rb
# frozen_string_literal: true class AddCountryToMerchantAccounts < ActiveRecord::Migration def change add_column :merchant_accounts, :country, :string, default: "US" end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20180627111725_add_more_indexes_in_purchases.rb
db/migrate/20180627111725_add_more_indexes_in_purchases.rb
# frozen_string_literal: true class AddMoreIndexesInPurchases < ActiveRecord::Migration def change add_index :purchases, :purchase_refund_balance_id add_index :purchases, :purchase_chargeback_balance_id add_index :purchases, :purchase_success_balance_id end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20220222192027_add_null_false_to_taxonomies_slug.rb
db/migrate/20220222192027_add_null_false_to_taxonomies_slug.rb
# frozen_string_literal: true class AddNullFalseToTaxonomiesSlug < ActiveRecord::Migration[6.1] def up if Rails.env.development? && Taxonomy.where(slug: nil).exists? raise <<~ERROR Your database contains a Taxonomy without slug. To fix it, run the script to fill the taxonomy slugs ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20120216022958_change_yen_to_jpy.rb
db/migrate/20120216022958_change_yen_to_jpy.rb
# frozen_string_literal: true class ChangeYenToJpy < ActiveRecord::Migration def up User.find_each do |user| if user.currency_type == "yen" user.currency_type = "jpy" end user.save(validate: false) end Link.find_each do |link| if link.price_currency_type == "yen" ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20250103191249_add_flags_to_offer_codes.rb
db/migrate/20250103191249_add_flags_to_offer_codes.rb
# frozen_string_literal: true class AddFlagsToOfferCodes < ActiveRecord::Migration[7.1] def change add_column :offer_codes, :flags, :bigint, default: 0, null: false end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20120211163119_remove_email_required_for_links.rb
db/migrate/20120211163119_remove_email_required_for_links.rb
# frozen_string_literal: true class RemoveEmailRequiredForLinks < ActiveRecord::Migration def up remove_column :links, :email_required end def down add_column :links, :email_required, :boolean, default: 0 end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20210922054233_add_flags_to_integrations.rb
db/migrate/20210922054233_add_flags_to_integrations.rb
# frozen_string_literal: true class AddFlagsToIntegrations < ActiveRecord::Migration[6.1] def change add_column :integrations, :flags, :bigint, default: 0, null: false end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20231031174049_create_purchase_early_fraud_warnings.rb
db/migrate/20231031174049_create_purchase_early_fraud_warnings.rb
# frozen_string_literal: true class CreatePurchaseEarlyFraudWarnings < ActiveRecord::Migration[7.0] def change create_table :purchase_early_fraud_warnings do |t| t.bigint :purchase_id, null: false t.string :processor_id, null: false t.bigint :dispute_id t.bigint :refund_id t.string ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20170417140253_add_partial_refunds_to_purchase.rb
db/migrate/20170417140253_add_partial_refunds_to_purchase.rb
# frozen_string_literal: true class AddPartialRefundsToPurchase < ActiveRecord::Migration def change add_column :purchases, :stripe_partially_refunded, :boolean, default: false end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20211023222329_add_available_price_cents_to_product_index.rb
db/migrate/20211023222329_add_available_price_cents_to_product_index.rb
# frozen_string_literal: true class AddAvailablePriceCentsToProductIndex < ActiveRecord::Migration[6.1] def up EsClient.indices.put_mapping( index: Link.index_name, body: { properties: { available_price_cents: { type: "long" }, } } ) end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20150329165612_make_dropbox_url_longer.rb
db/migrate/20150329165612_make_dropbox_url_longer.rb
# frozen_string_literal: true class MakeDropboxUrlLonger < ActiveRecord::Migration def change change_column :dropbox_files, :dropbox_url, :string, limit: 2000 change_column :dropbox_files, :s3_url, :string, limit: 2000 end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20120430184408_remove_author_from_infos.rb
db/migrate/20120430184408_remove_author_from_infos.rb
# frozen_string_literal: true class RemoveAuthorFromInfos < ActiveRecord::Migration def up remove_column :infos, :author end def down add_column :infos, :author, :string end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20120430184136_remove_tags_from_infos.rb
db/migrate/20120430184136_remove_tags_from_infos.rb
# frozen_string_literal: true class RemoveTagsFromInfos < ActiveRecord::Migration def up remove_column :infos, :tags end def down add_column :infos, :tags, :string end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20130304235024_add_default_value_to_webhook_fail_count.rb
db/migrate/20130304235024_add_default_value_to_webhook_fail_count.rb
# frozen_string_literal: true class AddDefaultValueToWebhookFailCount < ActiveRecord::Migration def up change_column :links, :webhook_fail_count, :integer, default: 0 end def down change_column :links, :webhook_fail_count, :integer, default: nil end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20130718214055_add_city_rate_to_zip_tax_rates.rb
db/migrate/20130718214055_add_city_rate_to_zip_tax_rates.rb
# frozen_string_literal: true class AddCityRateToZipTaxRates < ActiveRecord::Migration def change rename_column :zip_tax_rates, :special_rate, :city_rate add_column :zip_tax_rates, :special_rate, :decimal, precision: 8, scale: 7 end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20210306103539_reindex_dev_es_records.rb
db/migrate/20210306103539_reindex_dev_es_records.rb
# frozen_string_literal: true class ReindexDevEsRecords < ActiveRecord::Migration[6.1] # For developer convenience, we reindex everything since we're now using a new ES server, with no data. def up return if Rails.env.production? if EsClient.info["version"]["number"].starts_with?("6.") error_messag...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20140707165730_add_charge_processor_id_to_credit_card.rb
db/migrate/20140707165730_add_charge_processor_id_to_credit_card.rb
# frozen_string_literal: true class AddChargeProcessorIdToCreditCard < ActiveRecord::Migration def up add_column :credit_cards, :charge_processor_id, :string CreditCard.update_all({ charge_processor_id: "stripe" }) end def down remove_column :credit_cards, :charge_processor_id end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20220429193757_add_discover_fee_to_recommended_purchase_infos.rb
db/migrate/20220429193757_add_discover_fee_to_recommended_purchase_infos.rb
# frozen_string_literal: true class AddDiscoverFeeToRecommendedPurchaseInfos < ActiveRecord::Migration[6.1] def change add_column :recommended_purchase_infos, :discover_fee_per_thousand, :integer end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20210625121544_change_links_name_null.rb
db/migrate/20210625121544_change_links_name_null.rb
# frozen_string_literal: true class ChangeLinksNameNull < ActiveRecord::Migration[6.1] def change change_column_null :links, :name, false end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20240819015410_make_subtitle_files_cdn_deletable.rb
db/migrate/20240819015410_make_subtitle_files_cdn_deletable.rb
# frozen_string_literal: true class MakeSubtitleFilesCdnDeletable < ActiveRecord::Migration[7.1] def up change_table :subtitle_files, bulk: true do |t| t.datetime :deleted_from_cdn_at t.index :url t.index :deleted_at t.change :id, :bigint, null: false, auto_increment: true t.change...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20120425190921_change_type_back_to_card_type.rb
db/migrate/20120425190921_change_type_back_to_card_type.rb
# frozen_string_literal: true class ChangeTypeBackToCardType < ActiveRecord::Migration def up rename_column :credit_cards, :type, :card_type end def down rename_column :credit_cards, :card_type, :type end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20130904230941_prepare_bank_account.rb
db/migrate/20130904230941_prepare_bank_account.rb
# frozen_string_literal: true class PrepareBankAccount < ActiveRecord::Migration def up rename_table :ach_accounts, :bank_accounts add_column :bank_accounts, :type, :string, default: "AchAccount" add_column :bank_accounts, :branch_code, :string rename_column :bank_accounts, :routing_number, :bank_num...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20120226234156_change_type_to_filetype.rb
db/migrate/20120226234156_change_type_to_filetype.rb
# frozen_string_literal: true class ChangeTypeToFiletype < ActiveRecord::Migration def up remove_column :infos, :type add_column :infos, :filetype, :string end def down remove_column :infos, :filetype end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20210621081510_add_content_updated_at_to_product_index.rb
db/migrate/20210621081510_add_content_updated_at_to_product_index.rb
# frozen_string_literal: true class AddContentUpdatedAtToProductIndex < ActiveRecord::Migration[6.1] def up EsClient.indices.put_mapping( index: Link.index_name, body: { properties: { content_updated_at: { type: "date" }, } } ) end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20130209224715_add_parent_id_to_purchases.rb
db/migrate/20130209224715_add_parent_id_to_purchases.rb
# frozen_string_literal: true class AddParentIdToPurchases < ActiveRecord::Migration def change add_column :purchases, :parent_id, :integer add_column :purchases, :flags, :integer, default: 0, null: false end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20210502153119_remove_oauth_fields.rb
db/migrate/20210502153119_remove_oauth_fields.rb
# frozen_string_literal: true class RemoveOauthFields < ActiveRecord::Migration[6.1] def up change_table :oauth_applications do |t| t.remove :icon_file_name t.remove :icon_content_type t.remove :icon_file_size t.remove :icon_updated_at t.remove :icon_guid end end def down ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20130409211227_add_index_to_link_id_on_subscriptions.rb
db/migrate/20130409211227_add_index_to_link_id_on_subscriptions.rb
# frozen_string_literal: true class AddIndexToLinkIdOnSubscriptions < ActiveRecord::Migration def change add_index :subscriptions, :link_id end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20210620233525_remove_foreign_key_constraints.rb
db/migrate/20210620233525_remove_foreign_key_constraints.rb
# frozen_string_literal: true class RemoveForeignKeyConstraints < ActiveRecord::Migration[6.1] def up remove_foreign_key :devices, :users remove_foreign_key :featured_posts, :installments, column: :post_id remove_foreign_key :installment_events, :installments remove_foreign_key :large_sellers, :users...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20120928012423_add_index_to_created_at_in_purchases.rb
db/migrate/20120928012423_add_index_to_created_at_in_purchases.rb
# frozen_string_literal: true class AddIndexToCreatedAtInPurchases < ActiveRecord::Migration def change add_index :purchases, :created_at end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20250328062708_create_collaborator_invitations.rb
db/migrate/20250328062708_create_collaborator_invitations.rb
# frozen_string_literal: true class CreateCollaboratorInvitations < ActiveRecord::Migration[7.1] def change create_table :collaborator_invitations do |t| t.belongs_to :collaborator, null: false, foreign_key: false, index: { unique: true } t.timestamps end end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20241014141423_add_index_on_transcoded_videos_original_video_key.rb
db/migrate/20241014141423_add_index_on_transcoded_videos_original_video_key.rb
# frozen_string_literal: true class AddIndexOnTranscodedVideosOriginalVideoKey < ActiveRecord::Migration[7.1] def change add_index :transcoded_videos, :original_video_key end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20150128193618_add_tax_fields_to_refunds.rb
db/migrate/20150128193618_add_tax_fields_to_refunds.rb
# frozen_string_literal: true class AddTaxFieldsToRefunds < ActiveRecord::Migration def change add_column :refunds, :creator_tax_cents, :integer add_column :refunds, :gumroad_tax_cents, :integer end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20130228225328_add_deleted_at_to_installments.rb
db/migrate/20130228225328_add_deleted_at_to_installments.rb
# frozen_string_literal: true class AddDeletedAtToInstallments < ActiveRecord::Migration def change add_column :installments, :deleted_at, :datetime end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20230510160658_create_audience_members.rb
db/migrate/20230510160658_create_audience_members.rb
# frozen_string_literal: true class CreateAudienceMembers < ActiveRecord::Migration[7.0] def change create_table :audience_members do |t| t.bigint :seller_id, null: false t.string :email, null: false t.json :details t.timestamps t.index [:seller_id, :email], unique: true # de...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20201203030128_set_dropbox_files_to_utf8mb4.rb
db/migrate/20201203030128_set_dropbox_files_to_utf8mb4.rb
# frozen_string_literal: true class SetDropboxFilesToUtf8mb4 < ActiveRecord::Migration[6.0] def up execute alter_query("utf8mb4") end def down execute alter_query("utf8") end private def alter_query(charset) "ALTER TABLE dropbox_files" \ " CHARACTER SET #{charset} COLLATE #{charset}...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20240804195838_add_description_to_wishlists.rb
db/migrate/20240804195838_add_description_to_wishlists.rb
# frozen_string_literal: true class AddDescriptionToWishlists < ActiveRecord::Migration[7.1] def change add_column :wishlists, :description, :text end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false