New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Changeset 80731


Ignore:
Timestamp:
07/16/11 08:31:09 (4 years ago)
Author:
derek@…
Message:

installed_ports stores user_id rather than directly storing UUID

-Added migrations to remove uuid column and add user_id to installed_ports
-Updated submissions to store user_id when adding a row to installed_ports
-Updated views to show user_id

Location:
branches/gsoc11-statistics/stats-server
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/gsoc11-statistics/stats-server/app/controllers/submissions_controller.rb

    r80570 r80731  
    5959  end 
    6060 
    61   def add_port(uuid, macports_port, installed_port, month, year) 
     61  def add_port(user_id, macports_port, installed_port, month, year) 
    6262    logger.debug {"Adding installed port #{installed_port['name']}"} 
    6363         
    64     portEntry = InstalledPort.new(:uuid => uuid, 
     64    portEntry = InstalledPort.new(:user_id => user_id, 
    6565                             :port_id => macports_port.id, 
    6666                             :version => installed_port['version'], 
  • branches/gsoc11-statistics/stats-server/app/views/installed_ports/index.html.erb

    r80511 r80731  
    44        <tr> 
    55                <th> ID </th> 
    6                 <th> UUID </th> 
     6                <th> user_id </th> 
    77                <th> Port ID </th> 
    88                <th> Version </th> 
     
    1616  <tr> 
    1717    <td> <%= row.id %> </td> 
    18                 <td> <%= row.uuid %> </td> 
     18                <td> <%= row.user_id %> </td> 
    1919                <td> <%= row.port_id %> </td> 
    2020                <td> <%= row.version %></td> 
  • branches/gsoc11-statistics/stats-server/app/views/installed_ports/show.html.erb

    r80511 r80731  
    1 MY STUFF :D 
     1Todo: Remove or implement 
  • branches/gsoc11-statistics/stats-server/db/schema.rb

    r80567 r80731  
    1111# It's strongly recommended to check this file into your version control system. 
    1212 
    13 ActiveRecord::Schema.define(:version => 20110714162815) do 
     13ActiveRecord::Schema.define(:version => 20110716021834) do 
    1414 
    1515  create_table "categories", :force => true do |t| 
     
    2020 
    2121  create_table "installed_ports", :force => true do |t| 
    22     t.string   "uuid" 
    2322    t.integer  "port_id" 
    2423    t.string   "version" 
     
    2827    t.datetime "created_at" 
    2928    t.datetime "updated_at" 
     29    t.integer  "user_id" 
    3030  end 
    3131 
Note: See TracChangeset for help on using the changeset viewer.