<commit_before>class ShopCouponMigration < ActiveRecord::Migration
  def self.up
  
    create_table :shop_coupons, :force => true do |t|
      t.string :internal_name
      t.text :internal_description
      t.string :cart_name
      t.string :cart_description
      t.string :code
      t.string :tag
      t.boolean :active, :default => true
      t.boolean :first_order, :default => false
      t.boolean :one_time, :default => true
      t.boolean :automatic, :default => false
      t.boolean :exclusive, :default => true
      t.datetime :expires_at
      t.boolean :all_products, :default => true
      t.string :discount_type, :default => 'amount'
      t.decimal :discount_amount, :precision=> 14, :scale => 2
      t.decimal :discount_percentage, :precision=> 14, :scale => 2
      t.timestamps
    end
    
    add_index :shop_coupons, :active, :name => 'active_index'
    
    create_table :shop_coupon_products,:force => true do |t|
      t.integer :shop_coupon_id
      t.string  :shop_product_id
    end
    
    add_index :shop_coupon_products, :shop_coupon_id, :name => 'coupon'
    
    add_column :shop_order_items, :processed, :boolean, :default => false
    add_column :shop_order_items, :shipped, :boolean, :default => false
    add_column :shop_order_items, :shop_order_shipment_id, :integer
#    add_column :shop_order_items, :end_user_id, :integer
    
    create_table :shop_order_shipments do |t|
      t.integer :shop_order_id<commit_msg>Added end_user_id back in to the shop<commit_after>class ShopCouponMigration < ActiveRecord::Migration
  def self.up
  
    create_table :shop_coupons, :force => true do |t|
      t.string :internal_name
      t.text :internal_description
      t.string :cart_name
      t.string :cart_description
      t.string :code
      t.string :tag
      t.boolean :active, :default => true
      t.boolean :first_order, :default => false
      t.boolean :one_time, :default => true
      t.boolean :automatic, :default => false
      t.boolean :exclusive, :default => true
      t.datetime :expires_at
      t.boolean :all_products, :default => true
      t.string :discount_type, :default => 'amount'
      t.decimal :discount_amount, :precision=> 14, :scale => 2
      t.decimal :discount_percentage, :precision=> 14, :scale => 2
      t.timestamps
    end
    
    add_index :shop_coupons, :active, :name => 'active_index'
    
    create_table :shop_coupon_products,:force => true do |t|
      t.integer :shop_coupon_id
      t.string  :shop_product_id
    end
    
    add_index :shop_coupon_products, :shop_coupon_id, :name => 'coupon'
    
    add_column :shop_order_items, :processed, :boolean, :default => false
    add_column :shop_order_items, :shipped, :boolean, :default => false
    add_column :shop_order_items, :shop_order_shipment_id, :integer
    add_column :shop_order_items, :end_user_id, :integer
    
    create_table :shop_order_shipments do |t|
      t.integer :shop_order_id
{'fraction_non_alphanumeric': 0.10517416300304362, 'fraction_numerical': 0.004058167061210686, 'mean_word_length': 3.256115107913669, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7635860', 'n_tokens_mistral': 992, 'n_tokens_neox': 989, 'n_words': 231}