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/20120426001450_add_session_id_to_purchases.rb
db/migrate/20120426001450_add_session_id_to_purchases.rb
# frozen_string_literal: true class AddSessionIdToPurchases < ActiveRecord::Migration def change add_column :purchases, :session_id, :string end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20120919234302_add_suggested_price_cents_to_links.rb
db/migrate/20120919234302_add_suggested_price_cents_to_links.rb
# frozen_string_literal: true class AddSuggestedPriceCentsToLinks < ActiveRecord::Migration def change add_column :links, :suggested_price_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/20210106033416_add_missing_indices_to_affiliate_credits.rb
db/migrate/20210106033416_add_missing_indices_to_affiliate_credits.rb
# frozen_string_literal: true class AddMissingIndicesToAffiliateCredits < ActiveRecord::Migration[6.0] def change change_table :affiliate_credits do |t| t.index :affiliate_credit_refund_balance_id t.index :affiliate_credit_success_balance_id t.index :affiliate_credit_chargeback_balance_id, name: :idx_affiliate_credits_on_affiliate_credit_chargeback_balance_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/20250425212934_add_back_admin_action_call_infos.rb
db/migrate/20250425212934_add_back_admin_action_call_infos.rb
# frozen_string_literal: true class AddBackAdminActionCallInfos < ActiveRecord::Migration[7.1] def change create_table :admin_action_call_infos, charset: "utf8mb4", collation: "utf8mb4_unicode_ci" do |t| t.string :controller_name, null: false t.string :action_name, null: false t.integer :call_count, default: 0, null: false t.timestamps t.index [:controller_name, :action_name], name: "index_admin_action_call_infos_on_controller_name_and_action_name", unique: 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/20140117210119_add_flags_to_subscriptions.rb
db/migrate/20140117210119_add_flags_to_subscriptions.rb
# frozen_string_literal: true class AddFlagsToSubscriptions < ActiveRecord::Migration def change add_column :subscriptions, :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/20150728160357_increase_length_of_asset_preview_url.rb
db/migrate/20150728160357_increase_length_of_asset_preview_url.rb
# frozen_string_literal: true class IncreaseLengthOfAssetPreviewUrl < ActiveRecord::Migration def change change_column(:asset_previews, :attachment_file_name, :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/20120817004932_add_chargeback_date_to_purchases.rb
db/migrate/20120817004932_add_chargeback_date_to_purchases.rb
# frozen_string_literal: true class AddChargebackDateToPurchases < ActiveRecord::Migration def change add_column :purchases, :chargeback_date, :datetime end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20200821142223_create_versions.rb
db/migrate/20200821142223_create_versions.rb
# frozen_string_literal: true # This migration creates the `versions` table, the only schema PT requires. # All other migrations PT provides are optional. class CreateVersions < ActiveRecord::Migration[5.0] # The largest text column available in all supported RDBMS is # 1024^3 - 1 bytes, roughly one gibibyte. We specify a size # so that MySQL will use `longtext` instead of `text`. Otherwise, # when serializing very large objects, `text` might not be big enough. TEXT_BYTES = 1_073_741_823 def change create_table :versions do |t| t.string :item_type, { null: false } t.integer :item_id, null: false, limit: 8 t.string :event, null: false t.string :whodunnit t.text :object, limit: TEXT_BYTES # Known issue in MySQL: fractional second precision # ------------------------------------------------- # # MySQL timestamp columns do not support fractional seconds unless # defined with "fractional seconds precision". MySQL users should manually # add fractional seconds precision to this migration, specifically, to # the `created_at` column. # (https://dev.mysql.com/doc/refman/5.6/en/fractional-seconds.html) # # MySQL users should also upgrade to at least rails 4.2, which is the first # version of ActiveRecord with support for fractional seconds in MySQL. # (https://github.com/rails/rails/pull/14359) # t.datetime :created_at # Extra t.string :remote_ip t.text :request_path t.string :request_uuid end add_index :versions, %i(item_type item_id) end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20120521221756_add_preview_guid_to_links.rb
db/migrate/20120521221756_add_preview_guid_to_links.rb
# frozen_string_literal: true class AddPreviewGuidToLinks < ActiveRecord::Migration def up add_column :links, :preview_guid, :string end def down remove_column :links, :preview_guid end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20150114194817_add_scopes_to_oauth_applications.rb
db/migrate/20150114194817_add_scopes_to_oauth_applications.rb
# frozen_string_literal: true class AddScopesToOauthApplications < ActiveRecord::Migration def change add_column :oauth_applications, :scopes, :string, null: false, default: "" rescue nil end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20111221011759_change_names_to_original.rb
db/migrate/20111221011759_change_names_to_original.rb
# frozen_string_literal: true class ChangeNamesToOriginal < ActiveRecord::Migration def up Attachment.find_each do |attachment| puts attachment.id original_file_name = attachment.file_file_name next unless original_file_name # base = File.basename(original_file_name) ext = File.extname(original_file_name) attachment.file_file_name = "original#{ext}" attachment.save(validate: false) end 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/20160120205707_add_discount_code_to_service_charge.rb
db/migrate/20160120205707_add_discount_code_to_service_charge.rb
# frozen_string_literal: true class AddDiscountCodeToServiceCharge < ActiveRecord::Migration def change add_column :service_charges, :discount_code, :string, limit: 100 end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20181009173358_update_category_names.rb
db/migrate/20181009173358_update_category_names.rb
# frozen_string_literal: true class UpdateCategoryNames < ActiveRecord::Migration def up Category.where(name: "publishing").update_all(name: "writing") Category.where(name: "physical").update_all(name: "merchandise") end def down Category.where(name: "merchandise").update_all(name: "physical") Category.where(name: "writing").update_all(name: "publishing") end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20120531180320_add_index_to_failed_purchases.rb
db/migrate/20120531180320_add_index_to_failed_purchases.rb
# frozen_string_literal: true class AddIndexToFailedPurchases < ActiveRecord::Migration def change # Composite Key to enforce uniqueness and speed up searches. add_index :failed_purchases, [:link_id, :stripe_fingerprint], unique: true, name: "by_link_and_stripe_fingerprint" add_index :failed_purchases, :link_id add_index :failed_purchases, :stripe_fingerprint end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20121129193009_added_card_brand_to_bins.rb
db/migrate/20121129193009_added_card_brand_to_bins.rb
# frozen_string_literal: true class AddedCardBrandToBins < ActiveRecord::Migration def up add_column :bins, :card_brand, :string end def down remove_column :bins, :card_brand end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20210215094712_add_service_name_to_active_storage_blobs.active_storage.rb
db/migrate/20210215094712_add_service_name_to_active_storage_blobs.active_storage.rb
# frozen_string_literal: true # This migration comes from active_storage (originally 20190112182829) class AddServiceNameToActiveStorageBlobs < ActiveRecord::Migration[6.0] def up unless column_exists?(:active_storage_blobs, :service_name) add_column :active_storage_blobs, :service_name, :string if configured_service = ActiveStorage::Blob.service.name ActiveStorage::Blob.unscoped.update_all(service_name: configured_service) end change_column :active_storage_blobs, :service_name, :string, null: false end end def down remove_column :active_storage_blobs, :service_name end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20210624025201_remove_unused_columns_from_url_redirects.rb
db/migrate/20210624025201_remove_unused_columns_from_url_redirects.rb
# frozen_string_literal: true class RemoveUnusedColumnsFromUrlRedirects < ActiveRecord::Migration[6.1] def up execute <<~SQL ALTER TABLE `url_redirects` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, DROP COLUMN `webhooked_url`, DROP COLUMN `customized_file_url`, CHANGE `id` `id` bigint NOT NULL AUTO_INCREMENT, CHANGE `purchase_id` `purchase_id` bigint DEFAULT NULL, CHANGE `link_id` `link_id` bigint DEFAULT NULL, CHANGE `installment_id` `installment_id` bigint DEFAULT NULL, CHANGE `subscription_id` `subscription_id` bigint DEFAULT NULL, CHANGE `preorder_id` `preorder_id` bigint DEFAULT NULL, CHANGE `imported_customer_id` `imported_customer_id` bigint DEFAULT NULL, CHANGE `token` `token` varchar(255) DEFAULT NULL SQL end def down execute <<~SQL ALTER TABLE `url_redirects` CHARACTER SET utf8 COLLATE utf8_unicode_ci, ADD COLUMN `webhooked_url` text COLLATE utf8_unicode_ci AFTER `token`, ADD COLUMN `customized_file_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL AFTER `link_id`, CHANGE `id` `id` int(11) NOT NULL AUTO_INCREMENT, CHANGE `purchase_id` `purchase_id` int(11) DEFAULT NULL, CHANGE `link_id` `link_id` int(11) DEFAULT NULL, CHANGE `installment_id` `installment_id` int(11) DEFAULT NULL, CHANGE `subscription_id` `subscription_id` int(11) DEFAULT NULL, CHANGE `preorder_id` `preorder_id` int(11) DEFAULT NULL, CHANGE `imported_customer_id` `imported_customer_id` int(11) DEFAULT NULL, CHANGE `token` `token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL SQL end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20250225091231_create_community_chat_messages.rb
db/migrate/20250225091231_create_community_chat_messages.rb
# frozen_string_literal: true class CreateCommunityChatMessages < ActiveRecord::Migration[7.1] def change create_table :community_chat_messages do |t| t.references :community, null: false t.references :user, null: false t.text :content, null: false, size: :long t.datetime :deleted_at, index: 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/20151125215405_create_recurring_services.rb
db/migrate/20151125215405_create_recurring_services.rb
# frozen_string_literal: true class CreateRecurringServices < ActiveRecord::Migration def change create_table :recurring_services, options: "DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci" do |t| t.timestamps t.references :user t.string :type t.integer :price_cents t.integer :recurrence t.datetime :failed_at t.datetime :cancelled_at t.string :state t.string :json_data end add_index :recurring_services, :user_id end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20150416000000_create_tos_agreements.rb
db/migrate/20150416000000_create_tos_agreements.rb
# frozen_string_literal: true class CreateTosAgreements < ActiveRecord::Migration def change create_table :tos_agreements, options: "DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci" do |t| t.references :user t.string :ip t.column :created_at, :datetime end add_index :tos_agreements, :user_id end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20130910180507_add_refunder_to_refunds.rb
db/migrate/20130910180507_add_refunder_to_refunds.rb
# frozen_string_literal: true class AddRefunderToRefunds < ActiveRecord::Migration def up add_column :refunds, :refunding_user_id, :integer end def down remove_column :refunds, :refunding_user_id end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20150605000000_add_stripe_connect_account_id_to_bank_accounts.rb
db/migrate/20150605000000_add_stripe_connect_account_id_to_bank_accounts.rb
# frozen_string_literal: true class AddStripeConnectAccountIdToBankAccounts < ActiveRecord::Migration def change add_column :bank_accounts, :stripe_connect_account_id, :string end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20220729201912_remove_links_custom_fields.rb
db/migrate/20220729201912_remove_links_custom_fields.rb
# frozen_string_literal: true class RemoveLinksCustomFields < ActiveRecord::Migration[6.1] def up remove_column :links, :custom_fields end def down add_column :links, :custom_fields, :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/20150723011703_add_source_to_followers.rb
db/migrate/20150723011703_add_source_to_followers.rb
# frozen_string_literal: true class AddSourceToFollowers < ActiveRecord::Migration def change add_column :followers, :source, :string add_column :followers, :source_product_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/20111109223341_create_assets.rb
db/migrate/20111109223341_create_assets.rb
# frozen_string_literal: true class CreateAssets < ActiveRecord::Migration def change create_table :assets do |t| t.string :blob_key t.string :file_name t.integer :date t.string :unique_permalink t.string :file_type 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/20111122005722_index_receipts.rb
db/migrate/20111122005722_index_receipts.rb
# frozen_string_literal: true class IndexReceipts < ActiveRecord::Migration def up add_index :receipts, :purchase_id end def down remove_index :receipts, :purchase_id end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20130410034200_create_compliance_entities.rb
db/migrate/20130410034200_create_compliance_entities.rb
# frozen_string_literal: true class CreateComplianceEntities < ActiveRecord::Migration def change create_table :compliance_entities do |t| t.string :source_list t.integer :entity_number t.string :sdn_type t.string :programs t.string :name t.string :title t.string :address t.string :city t.string :state_or_province t.string :postal_code t.string :country t.string :alternate_name t.timestamps end add_index :compliance_entities, :name end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20250217233404_add_deleted_at_to_installment_plans.rb
db/migrate/20250217233404_add_deleted_at_to_installment_plans.rb
# frozen_string_literal: true class AddDeletedAtToInstallmentPlans < ActiveRecord::Migration[7.1] def change change_table :product_installment_plans, bulk: true do |t| t.datetime :deleted_at, default: nil, null: true t.index :deleted_at end add_belongs_to :payment_options, :product_installment_plan, default: nil, null: true end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20211020222413_create_product_page_view_index.rb
db/migrate/20211020222413_create_product_page_view_index.rb
# frozen_string_literal: true class CreateProductPageViewIndex < ActiveRecord::Migration[6.1] def up if Rails.env.production? || Rails.env.staging? ProductPageView.__elasticsearch__.create_index!(index: "product_page_views_v1") EsClient.indices.put_alias(name: "product_page_views", index: "product_page_views_v1") else ProductPageView.__elasticsearch__.create_index! end end def down if Rails.env.production? || Rails.env.staging? EsClient.indices.delete_alias(name: "product_page_views", index: "product_page_views_v1") ProductPageView.__elasticsearch__.delete_index!(index: "product_page_views_v1") else ProductPageView.__elasticsearch__.delete_index! end end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20211214112715_remove_background_columns_from_users.rb
db/migrate/20211214112715_remove_background_columns_from_users.rb
# frozen_string_literal: true class RemoveBackgroundColumnsFromUsers < ActiveRecord::Migration[6.1] def up change_table :users, bulk: true do |t| t.remove :background_color t.remove :background_image_url end end def down change_table :users, bulk: true do |t| t.string :background_color t.string :background_image_url end end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20240425113841_create_sent_abandoned_cart_emails.rb
db/migrate/20240425113841_create_sent_abandoned_cart_emails.rb
# frozen_string_literal: true class CreateSentAbandonedCartEmails < ActiveRecord::Migration[7.1] def change create_table :sent_abandoned_cart_emails do |t| t.references :cart, null: false t.references :installment, 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/20160108192913_add_json_data_to_workflow.rb
db/migrate/20160108192913_add_json_data_to_workflow.rb
# frozen_string_literal: true class AddJsonDataToWorkflow < ActiveRecord::Migration def change add_column :workflows, :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/20151013211002_add_variant_ref_to_installments.rb
db/migrate/20151013211002_add_variant_ref_to_installments.rb
# frozen_string_literal: true class AddVariantRefToInstallments < ActiveRecord::Migration def change add_reference :installments, :base_variant, index: true end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20121115184907_remove_reset_password_index_from_users.rb
db/migrate/20121115184907_remove_reset_password_index_from_users.rb
# frozen_string_literal: true class RemoveResetPasswordIndexFromUsers < ActiveRecord::Migration def up remove_index "users", "reset_password_token" end def down add_index "users", "reset_password_token" end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20120516223533_add_sound_scan_fields_to_links.rb
db/migrate/20120516223533_add_sound_scan_fields_to_links.rb
# frozen_string_literal: true class AddSoundScanFieldsToLinks < ActiveRecord::Migration def change add_column :links, :soundscan, :boolean add_column :links, :upc_code, :string add_column :links, :isrc_code, :string end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20150316205500_add_quantity_and_merchant_id_to_purchases.rb
db/migrate/20150316205500_add_quantity_and_merchant_id_to_purchases.rb
# frozen_string_literal: true class AddQuantityAndMerchantIdToPurchases < ActiveRecord::Migration def change add_column :purchases, :quantity, :integer, default: 1, null: false add_column :purchases, :merchant_account_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/20111116194231_remove_assets.rb
db/migrate/20111116194231_remove_assets.rb
# frozen_string_literal: true class RemoveAssets < ActiveRecord::Migration def up drop_table :assets end def down create_table :assets do |t| t.string :blob_key t.string :file_name t.integer :date t.string :unique_permalink t.string :file_type 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/20231002212026_remove_shown_on_profile_from_products.rb
db/migrate/20231002212026_remove_shown_on_profile_from_products.rb
# frozen_string_literal: true class RemoveShownOnProfileFromProducts < ActiveRecord::Migration[7.0] def up remove_column :links, :shown_on_profile end def down change_table :links, bulk: true do |t| t.column :shown_on_profile, :boolean, default: true t.index :shown_on_profile end end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20250330065025_remove_archived_at_from_affiliates.rb
db/migrate/20250330065025_remove_archived_at_from_affiliates.rb
# frozen_string_literal: true class RemoveArchivedAtFromAffiliates < ActiveRecord::Migration[7.1] def change remove_column :affiliates, :archived_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/20231119164327_drop_user_recommended_root_taxonomies.rb
db/migrate/20231119164327_drop_user_recommended_root_taxonomies.rb
# frozen_string_literal: true class DropUserRecommendedRootTaxonomies < ActiveRecord::Migration[7.0] def up drop_table :user_recommended_root_taxonomies end def down create_table "user_recommended_root_taxonomies", charset: "utf8mb4", collation: "utf8mb4_unicode_ci" do |t| t.bigint "user_id", null: false t.bigint "taxonomy_id", null: false t.integer "position", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["user_id", "position"], name: "index_user_recommended_root_taxonomies_on_user_id_and_position" end end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20130524233006_add_attachment_icon_to_oauth_applications.rb
db/migrate/20130524233006_add_attachment_icon_to_oauth_applications.rb
# frozen_string_literal: true class AddAttachmentIconToOauthApplications < ActiveRecord::Migration def self.up change_table :oauth_applications do |t| t.has_attached_file :icon end end def self.down drop_attached_file :oauth_applications, :icon end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20220201101203_create_taxonomy_hierarchies.rb
db/migrate/20220201101203_create_taxonomy_hierarchies.rb
# frozen_string_literal: true class CreateTaxonomyHierarchies < ActiveRecord::Migration[6.1] def change create_table :taxonomy_hierarchies, id: false do |t| t.bigint :ancestor_id, null: false t.bigint :descendant_id, null: false t.integer :generations, null: false end add_index :taxonomy_hierarchies, [:ancestor_id, :descendant_id, :generations], unique: true, name: "taxonomy_anc_desc_idx" add_index :taxonomy_hierarchies, [:descendant_id], name: "taxonomy_desc_idx" end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20150616174834_add_affiliate_id_to_affiliate_credits.rb
db/migrate/20150616174834_add_affiliate_id_to_affiliate_credits.rb
# frozen_string_literal: true class AddAffiliateIdToAffiliateCredits < ActiveRecord::Migration def change add_column :affiliate_credits, :affiliate_id, :integer add_index :affiliate_credits, :affiliate_id end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20220302222428_add_taxonomy_id_to_products_index.rb
db/migrate/20220302222428_add_taxonomy_id_to_products_index.rb
# frozen_string_literal: true class AddTaxonomyIdToProductsIndex < 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/20210511080203_create_self_service_affiliate_products.rb
db/migrate/20210511080203_create_self_service_affiliate_products.rb
# frozen_string_literal: true class CreateSelfServiceAffiliateProducts < ActiveRecord::Migration[6.1] def change create_table :self_service_affiliate_products do |t| t.references :seller, type: :bigint, null: false, index: true t.references :product, type: :bigint, null: false, index: { unique: true } t.boolean :enabled, default: false, null: false t.integer :affiliate_basis_points, null: false t.string :destination_url, limit: 2083 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/20200615140849_add_confidential_to_applications.rb
db/migrate/20200615140849_add_confidential_to_applications.rb
# frozen_string_literal: true class AddConfidentialToApplications < ActiveRecord::Migration def up # Default generated is true. We set this to false for backwards compat # https://github.com/doorkeeper-gem/doorkeeper/wiki/Migration-from-old-versions#database-changes-1 add_column :oauth_applications, :confidential, :boolean, null: false change_column_default :oauth_applications, :confidential, false end def down remove_column :oauth_applications, :confidential end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20120718174747_add_filetype_to_links.rb
db/migrate/20120718174747_add_filetype_to_links.rb
# frozen_string_literal: true class AddFiletypeToLinks < ActiveRecord::Migration def change add_column :links, :filetype, :string end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20201221121547_add_processor_payment_method_id_to_credit_card.rb
db/migrate/20201221121547_add_processor_payment_method_id_to_credit_card.rb
# frozen_string_literal: true class AddProcessorPaymentMethodIdToCreditCard < ActiveRecord::Migration[6.0] def change add_column :credit_cards, :processor_payment_method_id, :string end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20111209003710_add_email_required_on_link.rb
db/migrate/20111209003710_add_email_required_on_link.rb
# frozen_string_literal: true class AddEmailRequiredOnLink < ActiveRecord::Migration def up add_column :links, :email_required, :boolean, default: 0 add_column :purchases, :email, :text end def down remove_column :links, :email_required remove_column :purchases, :email, :text end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20190520204751_add_megaphone_states.rb
db/migrate/20190520204751_add_megaphone_states.rb
# frozen_string_literal: true class AddMegaphoneStates < ActiveRecord::Migration def change create_table :megaphone_states do |t| t.integer :user_id t.bigint :flags, null: false, default: 0 end add_index :megaphone_states, :user_id, unique: true end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20210519182305_create_purchase_wallet_types.rb
db/migrate/20210519182305_create_purchase_wallet_types.rb
# frozen_string_literal: true class CreatePurchaseWalletTypes < ActiveRecord::Migration[6.1] def change create_table :purchase_wallet_types do |t| t.references :purchase, index: { unique: true }, null: false t.string :wallet_type, index: true, 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/20220329131939_create_top_sellers.rb
db/migrate/20220329131939_create_top_sellers.rb
# frozen_string_literal: true class CreateTopSellers < ActiveRecord::Migration[6.1] def change create_table :top_sellers do |t| t.bigint :user_id, null: false, index: { unique: true } t.bigint :sales_usd, default: 0, null: false t.bigint :sales_count, default: 0, null: false t.integer :rank, null: false, index: 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/20190504212349_sync_dev_columns_lengths_and_positions.rb
db/migrate/20190504212349_sync_dev_columns_lengths_and_positions.rb
# frozen_string_literal: true class SyncDevColumnsLengthsAndPositions < ActiveRecord::Migration def up VARCHARS_CHANGES_FROM_191_TO_255.each do |table_name, columns_names| columns_names.each do |column_name| change_column(table_name, column_name, :string, limit: 255) end end TEXTS_CHANGES_FROM_65535_TO_16777215.each do |table_name, columns_names| columns_names.each do |column_name| change_column(table_name, column_name, :text, limit: 16777215) end end change_column :events, :referrer, :string, limit: 255 change_column :gifts, :gift_note, :text, limit: 4294967295 change_column :installments, :message, :text, limit: 4294967295 change_column :installments, :url, :text, limit: 4294967295 change_column :product_files, :json_data, :text, limit: 4294967295 change_column :affiliate_credits, :created_at, :datetime, after: :seller_id change_column :affiliate_credits, :updated_at, :datetime, after: :created_at change_column :credits, :balance_id, :integer, after: :amount_cents change_column :events, :friend_actions, :text, after: :is_modal change_column :links, :variants, :text, limit: 16777215, after: :custom_filetype change_column :purchases, :ip_address, :string, limit: 255, after: :session_id change_column :purchases, :is_mobile, :boolean, after: :ip_address change_column :purchases, :variants, :text, after: :stripe_status change_column :url_redirects, :flags, :integer, after: :customized_file_url change_column :users, :profile_picture_url, :string, limit: 255, after: :credit_card_id change_column :users, :country, :string, limit: 255, after: :soundcloud_token change_column :users, :state, :string, limit: 255, after: :country change_column :users, :city, :string, limit: 255, after: :state change_column :users, :zip_code, :string, limit: 255, after: :city change_column :users, :street_address, :string, limit: 255, after: :zip_code end def down VARCHARS_CHANGES_FROM_191_TO_255.each do |table_name, columns_names| columns_names.each do |column_name| change_column(table_name, column_name, :string, limit: 191) end end TEXTS_CHANGES_FROM_65535_TO_16777215.each do |table_name, columns_names| columns_names.each do |column_name| change_column(table_name, column_name, :text, limit: 65535) end end change_column :events, :referrer, :string, limit: 1024 change_column :gifts, :gift_note, :text, limit: 65535 change_column :installments, :message, :text, limit: 65535 change_column :installments, :url, :text, limit: 65535 change_column :product_files, :json_data, :text, limit: 65535 change_column :affiliate_credits, :created_at, :datetime, after: :seller_id change_column :affiliate_credits, :updated_at, :datetime, after: :created_at change_column :credits, :balance_id, :integer, after: :updated_at change_column :events, :friend_actions, :text, after: :browser_guid change_column :links, :variants, :text, limit: 65535, after: :territory_restriction change_column :purchases, :ip_address, :string, limit: 191, after: :session_id change_column :purchases, :is_mobile, :boolean, after: :ip_address change_column :purchases, :variants, :text, after: :subunsub change_column :url_redirects, :flags, :integer, after: :subscription_id change_column :users, :profile_picture_url, :string, limit: 191, after: :soundcloud_token change_column :users, :country, :string, limit: 191, after: :profile_meta change_column :users, :state, :string, limit: 191, after: :country change_column :users, :city, :string, limit: 191, after: :state change_column :users, :zip_code, :string, limit: 191, after: :city change_column :users, :street_address, :string, limit: 191, after: :zip_code end VARCHARS_CHANGES_FROM_191_TO_255 = { asset_previews: [ :attachment_content_type, :guid, ], balance_transactions: [ :issued_amount_currency, :holding_amount_currency, ], balances: [ :currency, :holding_currency, :state, ], bank_accounts: [ :bank_number, :state, :account_number_last_four, :account_holder_full_name, :type, :branch_code, :account_type, :stripe_bank_account_id, :stripe_fingerprint, :stripe_connect_account_id, ], banks: [ :routing_number, :name, ], base_variants: [ :name, :type, :custom_sku, ], bins: [ :card_bin, :issuing_bank, :card_type, :card_level, :iso_country_name, :iso_country_a2, :iso_country_a3, :website, :phone_number, :card_brand, ], blocked_ips: [ :ip_address, ], comments: [ :commentable_type, :author_name, :comment_type, ], consumption_events: [ :event_type, :platform, ], credit_cards: [ :card_type, :stripe_customer_id, :visual, :stripe_fingerprint, :card_country, :stripe_card_id, :card_bin, :card_data_handling_mode, :charge_processor_id, :braintree_customer_id, ], custom_domains: [ :domain, :type ], delayed_emails: [ :email_type, ], disputes: [ :charge_processor_id, :charge_processor_dispute_id, :reason, :state, ], dropbox_files: [ :state, ], dynamic_product_page_switches: [ :name ], event_test_path_assignments: [ :event_name, :active_test_paths, ], events: [ :ip_address, :event_name, :parent_referrer, :language, :browser, :email, :card_type, :card_visual, :purchase_state, :billing_zip, :view_url, :fingerprint, :ip_country, :browser_fingerprint, :browser_plugins, :browser_guid, :referrer_domain, :ip_state, :active_test_path_assignments, ], failed_purchases: [ :ip_address, :stripe_fingerprint, :card_type, :card_country, ], followers: [ :email, :source, ], gifts: [ :state, :giftee_email, :gifter_email, ], import_jobs: [ :import_file_url, :state, ], imported_customers: [ :email, ], installment_rules: [ :time_period, ], installments: [ :name, :installment_type, :cover_image_url, ], invites: [ :receiver_email, :invite_state, ], licenses: [ :serial, :json_data, ], links: [ :name, :price_currency_type, :partner_source, :upc_code, :isrc_code, :preview_file_name, :preview_content_type, :preview_guid, :attachment_file_name, :attachment_content_type, :attachment_guid, :preview_meta, :attachment_meta, :custom_filetype, :filetype, :filegroup, :common_color, :custom_download_text, :attachment_meta, :external_mapping_id, ], merchant_accounts: [ :acquirer_id, :acquirer_merchant_id, :charge_processor_id, :charge_processor_merchant_id, :relationship, :country, :currency, ], oauth_access_grants: [ :token, :redirect_uri, :scopes, ], oauth_access_tokens: [ :token, :refresh_token, :scopes, ], oauth_applications: [ :name, :uid, :secret, :redirect_uri, :owner_type, :icon_file_name, :icon_content_type, :icon_guid, :scopes, ], offer_codes: [ :currency_type, ], payments: [ :state, :txn_id, :unique_id, :correlation_id, :processor, :payment_address, :stripe_connect_account_id, :stripe_transfer_id, :stripe_internal_transfer_id, :local_currency, :currency, ], preorder_links: [ :state, :url, :attachment_guid, :custom_filetype, ], preorders: [ :state, ], prices: [ :currency, :recurrence, ], product_files: [ :filetype, :filegroup, ], product_files_archives: [ :product_files_archive_state, ], purchase_sales_tax_infos: [ :elected_country_code, :card_country_code, :ip_country_code, :country_code, :postal_code, :ip_address, ], purchases: [ :displayed_price_currency_type, :rate_converted_to_usd, :street_address, :city, :state, :zip_code, :country, :full_name, :purchaser_type, :session_id, :stripe_transaction_id, :stripe_fingerprint, :stripe_card_id, :ip_address, :subunsub, :referrer, :stripe_status, :card_type, :card_visual, :purchase_state, :card_country, :stripe_error_code, :browser_guid, :error_code, :card_bin, :ip_country, :ip_state, :billing_name, :billing_zip_code, :credit_card_zipcode, :json_data, :card_data_handling_mode, :charge_processor_id, :processor_fee_cents_currency, ], recommended_purchase_infos: [ :recommendation_type, ], resource_subscriptions: [ :resource_name, :post_url, ], shipments: [ :ship_state, :tracking_number, :carrier, ], shipping_destinations: [ :country_code, ], subtitle_files: [ :language, ], tos_agreements: [ :ip, ], transcoded_videos: [ :original_video_key, :transcoded_video_key, :transcoder_preset_key, :job_id, :state, ], url_redirects: [ :token, :customized_file_url, ], user_compliance_info: [ :full_name, :street_address, :city, :state, :zip_code, :country, :telephone_number, :vertical, :json_data, :business_name, :business_street_address, :business_city, :business_state, :business_zip_code, :business_country, :business_type, :dba, :first_name, :last_name, :stripe_identity_document_id, ], user_compliance_info_requests: [ :field_needed, :state, ], user_underwriting: [ :from_relationship, :to_relationship, :underwriting_state, :submission_group_id, ], users: [ :reset_password_token, :current_sign_in_ip, :last_sign_in_ip, :name, :payment_address, :reset_hash, :password_salt, :provider, :currency_type, :facebook_profile, :facebook_gender, :facebook_verified, :twitter_handle, :twitter_verified, :twitter_location, :soundcloud_username, :soundcloud_token, :profile_picture_url, :profile_file_name, :profile_content_type, :profile_guid, :profile_meta, :country, :state, :city, :zip_code, :street_address, :fanpage, :highlight_color, :background_color, :background_image_url, :external_css_url, :account_created_ip, :twitter_oauth_token, :twitter_oauth_secret, :locale, :admin_notes, :google_analytics_id, :timezone, :user_risk_state, :tos_violation_reason, :kindle_email, :support_email, :conversion_tracking_facebook_id, :conversion_tracking_image_url, :google_analytics_domains, :recommendation_type, :background_video_url, ], variant_categories: [ :title, ], workflows: [ :workflow_type, ], zip_tax_rates: [ :state, :tax_region_code, :tax_region_name, :zip_code, :country, ] } TEXTS_CHANGES_FROM_65535_TO_16777215 = { comments: [ :content, :json_data, ], dropbox_files: [ :json_data, ], installments: [ :url, :json_data, ], links: [ :url, :preview_url, :description, :territory_restriction, :variants, :preview_oembed, :custom_receipt, :webhook_url, :custom_fields, :json_data, ], product_files: [ :json_data, ], refunds: [ :json_data, ], shipping_destinations: [ :json_data, ], users: [ :custom_css, :bio, :notification_endpoint, :admin_notes, :json_data, :page_layout, ] } end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20131104184424_add_account_type_to_bank_account.rb
db/migrate/20131104184424_add_account_type_to_bank_account.rb
# frozen_string_literal: true class AddAccountTypeToBankAccount < ActiveRecord::Migration def change add_column :bank_accounts, :account_type, :string end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20190427161332_add_purchases_seller_state_date_index.rb
db/migrate/20190427161332_add_purchases_seller_state_date_index.rb
# frozen_string_literal: true class AddPurchasesSellerStateDateIndex < ActiveRecord::Migration def change add_index :purchases, [:seller_id, :purchase_state, :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/20231123113306_remove_url_from_base_variants.rb
db/migrate/20231123113306_remove_url_from_base_variants.rb
# frozen_string_literal: true class RemoveUrlFromBaseVariants < ActiveRecord::Migration[7.0] def up remove_column :base_variants, :url end def down add_column :base_variants, :url, :string end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20150814212030_add_consumed_at_and_media_location_to_consumption_events.rb
db/migrate/20150814212030_add_consumed_at_and_media_location_to_consumption_events.rb
# frozen_string_literal: true class AddConsumedAtAndMediaLocationToConsumptionEvents < ActiveRecord::Migration def change add_column :consumption_events, :consumed_at, :datetime add_column :consumption_events, :media_location, :integer end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20120526043012_add_can_contact_to_purchases.rb
db/migrate/20120526043012_add_can_contact_to_purchases.rb
# frozen_string_literal: true class AddCanContactToPurchases < ActiveRecord::Migration def up change_table :purchases do |t| t.boolean :can_contact, default: true end Purchase.update_all ["can_contact = ?", true] end def down remove_column :purchases, :can_contact end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20230821194317_create_seller_profile_sections.rb
db/migrate/20230821194317_create_seller_profile_sections.rb
# frozen_string_literal: true class CreateSellerProfileSections < ActiveRecord::Migration[7.0] def change create_table :seller_profile_sections do |t| t.references :seller, index: true, null: false t.string :header t.text :shown_products, null: false t.boolean :show_filters, null: false t.string :default_product_sort, 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/20230612153224_add_minimum_quantity_to_offer_codes.rb
db/migrate/20230612153224_add_minimum_quantity_to_offer_codes.rb
# frozen_string_literal: true class AddMinimumQuantityToOfferCodes < ActiveRecord::Migration[7.0] def change change_table :offer_codes, bulk: true do |t| t.integer "minimum_quantity" end end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20151104000000_add_credit_card_id_to_bank_accounts.rb
db/migrate/20151104000000_add_credit_card_id_to_bank_accounts.rb
# frozen_string_literal: true class AddCreditCardIdToBankAccounts < ActiveRecord::Migration def change add_column :bank_accounts, :credit_card_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/20151008034224_add_json_data_to_payments.rb
db/migrate/20151008034224_add_json_data_to_payments.rb
# frozen_string_literal: true class AddJsonDataToPayments < ActiveRecord::Migration def change add_column :payments, :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/20250116082729_add_unique_index_on_utm_columns_of_utm_links.rb
db/migrate/20250116082729_add_unique_index_on_utm_columns_of_utm_links.rb
# frozen_string_literal: true class AddUniqueIndexOnUtmColumnsOfUtmLinks < ActiveRecord::Migration[7.1] def up change_table :utm_links, bulk: true do |t| t.change :utm_source, :string, limit: 64, null: false t.change :utm_medium, :string, limit: 64, null: false t.change :utm_campaign, :string, limit: 64, null: false t.change :utm_term, :string, limit: 64 t.change :utm_content, :string, limit: 64 t.index [:seller_id, :utm_source, :utm_medium, :utm_campaign, :utm_term, :utm_content], unique: true, where: "deleted_at IS NULL", name: "index_utm_links_on_utm_fields" end end def down change_table :utm_links, bulk: true do |t| t.change :utm_source, :string, limit: nil, null: true t.change :utm_medium, :string, limit: nil, null: false t.change :utm_campaign, :string, limit: nil, null: false t.change :utm_term, :string, limit: nil t.change :utm_content, :string, limit: nil t.remove_index name: "index_utm_links_on_utm_fields" end end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20120817014544_remove_chargebacked_from_purchases.rb
db/migrate/20120817014544_remove_chargebacked_from_purchases.rb
# frozen_string_literal: true class RemoveChargebackedFromPurchases < ActiveRecord::Migration def up remove_column :purchases, :chargebacked end def down add_column :purchases, :chargebacked, :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/20210530215102_add_folder_id_to_product_files.rb
db/migrate/20210530215102_add_folder_id_to_product_files.rb
# frozen_string_literal: true class AddFolderIdToProductFiles < ActiveRecord::Migration[6.1] def change change_table :product_files do |t| t.bigint :folder_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/20120615200410_add_variants_to_purchases.rb
db/migrate/20120615200410_add_variants_to_purchases.rb
# frozen_string_literal: true class AddVariantsToPurchases < ActiveRecord::Migration def change add_column :purchases, :variants, :text end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20240222233850_create_processor_payment_intents.rb
db/migrate/20240222233850_create_processor_payment_intents.rb
# frozen_string_literal: true class CreateProcessorPaymentIntents < ActiveRecord::Migration[7.1] def change create_table :processor_payment_intents do |t| t.bigint :purchase_id, null: false, index: { unique: true } t.string :intent_id, null: false, index: 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/20230121043012_add_clicks_to_discover_searches.rb
db/migrate/20230121043012_add_clicks_to_discover_searches.rb
# frozen_string_literal: true class AddClicksToDiscoverSearches < ActiveRecord::Migration[7.0] def change add_reference :discover_searches, :clicked_resource, polymorphic: true end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20130610232658_add_name_and_link_id_index_to_offer_codes.rb
db/migrate/20130610232658_add_name_and_link_id_index_to_offer_codes.rb
# frozen_string_literal: true class AddNameAndLinkIdIndexToOfferCodes < ActiveRecord::Migration def change add_index :offer_codes, [: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/20250317100111_create_community_chat_recap_runs.rb
db/migrate/20250317100111_create_community_chat_recap_runs.rb
# frozen_string_literal: true class CreateCommunityChatRecapRuns < ActiveRecord::Migration[7.1] def change create_table :community_chat_recap_runs do |t| t.string :recap_frequency, null: false, index: true t.datetime :from_date, null: false t.datetime :to_date, null: false t.integer :recaps_count, null: false, default: 0 t.datetime :finished_at t.datetime :notified_at t.timestamps t.index %i[recap_frequency from_date to_date], unique: 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/20250225092546_create_last_read_community_chat_messages.rb
db/migrate/20250225092546_create_last_read_community_chat_messages.rb
# frozen_string_literal: true class CreateLastReadCommunityChatMessages < ActiveRecord::Migration[7.1] def change create_table :last_read_community_chat_messages do |t| t.references :user, null: false t.references :community, null: false t.references :community_chat_message, null: false t.timestamps t.index [:user_id, :community_id], unique: 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/20151221210133_remove_user_column_from_email_info.rb
db/migrate/20151221210133_remove_user_column_from_email_info.rb
# frozen_string_literal: true class RemoveUserColumnFromEmailInfo < ActiveRecord::Migration def change remove_column :email_infos, :user_id end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20141028183040_remove_index_on_deleted_at.rb
db/migrate/20141028183040_remove_index_on_deleted_at.rb
# frozen_string_literal: true class RemoveIndexOnDeletedAt < ActiveRecord::Migration def change remove_index :links, :deleted_at end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20150922003020_create_import_jobs.rb
db/migrate/20150922003020_create_import_jobs.rb
# frozen_string_literal: true class CreateImportJobs < ActiveRecord::Migration def change create_table :import_jobs, options: "DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci" do |t| t.string :import_file_url t.integer :user_id t.integer :link_id t.string :state t.integer :flags, default: 0, 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/20140725195455_add_amount_percentage_column_to_offer_codes.rb
db/migrate/20140725195455_add_amount_percentage_column_to_offer_codes.rb
# frozen_string_literal: true class AddAmountPercentageColumnToOfferCodes < ActiveRecord::Migration def change add_column :offer_codes, :amount_percentage, :integer end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20170125203547_create_oauth_authorizations.rb
db/migrate/20170125203547_create_oauth_authorizations.rb
# frozen_string_literal: true class CreateOauthAuthorizations < ActiveRecord::Migration def change create_table :oauth_authorizations do |t| t.integer :user_id, index: true t.integer :provider t.string :access_token t.string :refresh_token t.datetime :expires_at t.string :provider_user_id t.string :publishable_key t.text :raw end end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20141007071105_add_user_id_to_offer_codes.rb
db/migrate/20141007071105_add_user_id_to_offer_codes.rb
# frozen_string_literal: true class AddUserIdToOfferCodes < ActiveRecord::Migration def change add_column :offer_codes, :user_id, :integer add_index :offer_codes, [:user_id], name: "index_offer_codes_on_user_id" end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20120718175531_add_height_to_links.rb
db/migrate/20120718175531_add_height_to_links.rb
# frozen_string_literal: true class AddHeightToLinks < ActiveRecord::Migration def change add_column :links, :height, :integer end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20201103221330_remove_applied_at_from_subscription_plan_changes.rb
db/migrate/20201103221330_remove_applied_at_from_subscription_plan_changes.rb
# frozen_string_literal: true class RemoveAppliedAtFromSubscriptionPlanChanges < ActiveRecord::Migration[6.0] def up safety_assured { remove_column :subscription_plan_changes, :applied_at } end def down add_column :subscription_plan_changes, :applied_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/20250103124729_create_utm_links.rb
db/migrate/20250103124729_create_utm_links.rb
# frozen_string_literal: true class CreateUtmLinks < ActiveRecord::Migration[7.1] def change create_table :utm_links do |t| t.references :seller, null: false t.string :title, null: false t.string :target_resource_type, null: false t.string :target_resource_id t.string :permalink, null: false, index: { unique: true } t.string :utm_campaign, null: false, index: true t.string :utm_medium, null: false t.string :utm_source t.string :utm_term t.string :utm_content t.datetime :first_click_at t.datetime :last_click_at t.integer :total_clicks, default: 0, null: false t.integer :unique_clicks, default: 0, null: false t.timestamps t.index [:target_resource_type, :target_resource_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/20151028153410_add_product_categories.rb
db/migrate/20151028153410_add_product_categories.rb
# frozen_string_literal: true class AddProductCategories < ActiveRecord::Migration def change create_table(:categories) do |t| t.string(:name, limit: 100) t.timestamps end add_index(:categories, :name) create_table(:product_categorizations) do |t| t.belongs_to(:category) t.belongs_to(:product) t.timestamps end add_index(:product_categorizations, :category_id) add_index(:product_categorizations, :product_id) end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20120112224613_add_token_to_url_redirect.rb
db/migrate/20120112224613_add_token_to_url_redirect.rb
# frozen_string_literal: true class AddTokenToUrlRedirect < ActiveRecord::Migration def change add_column :url_redirects, :token, :string end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20201207034544_remove_unused_parents_chidren.rb
db/migrate/20201207034544_remove_unused_parents_chidren.rb
# frozen_string_literal: true class RemoveUnusedParentsChidren < ActiveRecord::Migration[6.0] def up drop_table :parents_children end def down create_table "parents_children", id: false, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci", force: :cascade do |t| t.integer "parent_id" t.integer "child_id" t.datetime "created_at" t.datetime "updated_at" t.index ["child_id"], name: "index_parents_children_on_child_id" t.index ["parent_id"], name: "index_parents_children_on_parent_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/20151022194039_add_country_to_bank_accounts.rb
db/migrate/20151022194039_add_country_to_bank_accounts.rb
# frozen_string_literal: true class AddCountryToBankAccounts < ActiveRecord::Migration def change add_column :bank_accounts, :country, :string end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20121005010456_add_card_country_to_purchases.rb
db/migrate/20121005010456_add_card_country_to_purchases.rb
# frozen_string_literal: true class AddCardCountryToPurchases < ActiveRecord::Migration def change add_column :purchases, :card_country, :string end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20220712175710_add_index_to_installments.rb
db/migrate/20220712175710_add_index_to_installments.rb
# frozen_string_literal: true class AddIndexToInstallments < ActiveRecord::Migration[6.1] def change add_index :installments, :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/20121018174416_add_friend_actions_to_events.rb
db/migrate/20121018174416_add_friend_actions_to_events.rb
# frozen_string_literal: true class AddFriendActionsToEvents < ActiveRecord::Migration def change add_column :events, :friend_actions, :text end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20121018032034_add_external_id_to_users.rb
db/migrate/20121018032034_add_external_id_to_users.rb
# frozen_string_literal: true class AddExternalIdToUsers < ActiveRecord::Migration def change add_column :users, :external_id, :string end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20250120143213_make_utm_link_visits_country_code_nullable.rb
db/migrate/20250120143213_make_utm_link_visits_country_code_nullable.rb
# frozen_string_literal: true class MakeUtmLinkVisitsCountryCodeNullable < ActiveRecord::Migration[7.1] def change change_column_null :utm_link_visits, :country_code, true end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20230707223804_remove_category_tables.rb
db/migrate/20230707223804_remove_category_tables.rb
# frozen_string_literal: true class RemoveCategoryTables < ActiveRecord::Migration[7.0] def up drop_table :categories drop_table :product_categorizations drop_table :user_categorizations end def down create_table "categories", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci" do |t| t.string "name", limit: 100 t.datetime "created_at", precision: nil t.datetime "updated_at", precision: nil t.index ["name"], name: "index_categories_on_name" end create_table "product_categorizations", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci" do |t| t.integer "category_id" t.integer "product_id" t.datetime "created_at", precision: nil t.datetime "updated_at", precision: nil t.index ["category_id"], name: "index_product_categorizations_on_category_id" t.index ["product_id"], name: "index_product_categorizations_on_product_id" end create_table "user_categorizations", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci" do |t| t.integer "category_id" t.integer "user_id" t.datetime "created_at", precision: nil t.datetime "updated_at", precision: nil t.index ["category_id"], name: "index_user_categorizations_on_category_id" t.index ["user_id"], name: "index_user_categorizations_on_user_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/20211013114048_change_product_folder_name.rb
db/migrate/20211013114048_change_product_folder_name.rb
# frozen_string_literal: true class ChangeProductFolderName < ActiveRecord::Migration[6.1] def up change_column :product_folders, :name, :string, null: false end def down change_column :product_folders, :name, :string, null: true end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20140528235035_create_twitter_merchants.rb
db/migrate/20140528235035_create_twitter_merchants.rb
# frozen_string_literal: true class CreateTwitterMerchants < ActiveRecord::Migration def change create_table :twitter_merchants do |t| t.references :user t.string :email t.string :name t.string :support_email t.string :domains t.integer :twitter_assigned_merchant_id, limit: 8 t.integer :flags, default: 0, null: false t.timestamps end add_index :twitter_merchants, :user_id add_index :twitter_merchants, :twitter_assigned_merchant_id end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20130419202453_create_preorders.rb
db/migrate/20130419202453_create_preorders.rb
# frozen_string_literal: true class CreatePreorders < ActiveRecord::Migration def change create_table :preorders do |t| t.references :preorder_link, null: false t.references :seller, null: false t.references :purchaser t.string :state, null: false t.timestamps end add_index :preorders, :preorder_link_id add_index :preorders, :seller_id add_index :preorders, :purchaser_id end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20240620200757_create_call_limitation_infos.rb
db/migrate/20240620200757_create_call_limitation_infos.rb
# frozen_string_literal: true class CreateCallLimitationInfos < ActiveRecord::Migration[7.1] def change create_table :call_limitation_infos do |t| t.references :call, null: false t.integer :minimum_notice_in_minutes t.integer :maximum_calls_per_day 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/20120816213321_add_default_for_filetype.rb
db/migrate/20120816213321_add_default_for_filetype.rb
# frozen_string_literal: true class AddDefaultForFiletype < ActiveRecord::Migration def up change_column :links, :filetype, :string, default: "link" change_column :links, :filegroup, :string, default: "url" end def down change_column :links, :filetype, :string, default: nil change_column :links, :filegroup, :string, 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/20150915174708_increase_length_of_s3_url_fields.rb
db/migrate/20150915174708_increase_length_of_s3_url_fields.rb
# frozen_string_literal: true class IncreaseLengthOfS3UrlFields < ActiveRecord::Migration def change change_column(:product_files, :url, :string, limit: 1024) change_column(:processed_audios, :url, :string, limit: 1024) change_column(:product_files_archives, :url, :string, limit: 1024) change_column(:stamped_pdfs, :url, :string, limit: 1024) change_column(:subtitle_files, :url, :string, limit: 1024) end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20120711045354_add_ban_queued_to_users.rb
db/migrate/20120711045354_add_ban_queued_to_users.rb
# frozen_string_literal: true class AddBanQueuedToUsers < ActiveRecord::Migration def change add_column :users, :ban_queued, :boolean end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20230104184824_create_team_invitations.rb
db/migrate/20230104184824_create_team_invitations.rb
# frozen_string_literal: true class CreateTeamInvitations < ActiveRecord::Migration[7.0] def change create_table :team_invitations do |t| t.bigint :seller_id, null: false t.string :email, null: false t.string :role, null: false t.timestamps t.datetime :expires_at, null: false t.datetime :accepted_at t.datetime :deleted_at t.index [:seller_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/20210405121212_drop_unnecessary_indexes.rb
db/migrate/20210405121212_drop_unnecessary_indexes.rb
# frozen_string_literal: true class DropUnnecessaryIndexes < ActiveRecord::Migration[6.1] def change remove_index :service_charges, :processor_payment_intent_id end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/db/migrate/20121031180805_add_webhook_url_to_links.rb
db/migrate/20121031180805_add_webhook_url_to_links.rb
# frozen_string_literal: true class AddWebhookUrlToLinks < ActiveRecord::Migration def change add_column :links, :webhook_url, :text end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false