1374 lines
40 KiB
HTML
1374 lines
40 KiB
HTML
<html>
|
|
<head>
|
|
<style>
|
|
table { background: #fff; color: #000; }
|
|
.ruby .normal { color: #000; }
|
|
.ruby .comment { color: #005; font-style: italic; }
|
|
.ruby .keyword { color: #A44; font-weight: bold; }
|
|
.ruby .method { color: #44f; }
|
|
.ruby .class { color: #b1713d; }
|
|
.ruby .module { color: #050; }
|
|
.ruby .punct { color: #668; font-weight: bold; }
|
|
.ruby .symbol { color: #00f; }
|
|
.ruby .string { color: #4a4; }
|
|
.ruby .char { color: #F07; }
|
|
.ruby .ident { color: #000; }
|
|
.ruby .constant { color: #b1713d; }
|
|
.ruby .regex { color: #B66; background: #FEF; }
|
|
.ruby .number { color: #F99; }
|
|
.ruby .attribute { color: #f84; }
|
|
.ruby .global { color: #7FB; }
|
|
.ruby .expr { color: #227; }
|
|
.ruby .escape { color: #277; }
|
|
</style>
|
|
<title>Analyzed File Report</title>
|
|
</head>
|
|
<body>
|
|
<table cellpadding='0' cellspacing='0' class='ruby'>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span><span class="comment"># encoding: UTF-8</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n2" name="n2">2</a></span><span class="comment"># This file is auto-generated from the current state of the database. Instead</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n3" name="n3">3</a></span><span class="comment"># of editing this file, please use the migrations feature of Active Record to</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n4" name="n4">4</a></span><span class="comment"># incrementally modify your database, and then regenerate this schema definition.</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n5" name="n5">5</a></span><span class="comment">#</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n6" name="n6">6</a></span><span class="comment"># Note that this schema.rb definition is the authoritative source for your</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n7" name="n7">7</a></span><span class="comment"># database schema. If you need to create the application database on another</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n8" name="n8">8</a></span><span class="comment"># system, you should be using db:schema:load, not running all the migrations</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"> <a href="#n9" name="n9">9</a></span><span class="comment"># from scratch. The latter is a flawed and unsustainable approach (the more migrations</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span><span class="comment"># you'll amass, the slower it'll run and the greater likelihood for issues).</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n11" name="n11">11</a></span><span class="comment">#</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n12" name="n12">12</a></span><span class="comment"># It's strongly recommended that you check this file into your version control system.</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n13" name="n13">13</a></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n14" name="n14">14</a></span><span class="constant">ActiveRecord</span>::<span class="constant">Schema</span>.define(<span class="key">version</span>: <span class="integer">20161229084919</span>) <span class="keyword">do</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n15" name="n15">15</a></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
<ul>
|
|
|
|
<li>always add db index (comments => [user_id]) » rails_best_practices</li>
|
|
|
|
</ul>
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n16" name="n16">16</a></span> create_table <span class="string"><span class="delimiter">"</span><span class="content">comments</span><span class="delimiter">"</span></span>, <span class="key">force</span>: <span class="symbol">:cascade</span> <span class="keyword">do</span> |t|
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n17" name="n17">17</a></span> t.text <span class="string"><span class="delimiter">"</span><span class="content">content</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n18" name="n18">18</a></span> t.integer <span class="string"><span class="delimiter">"</span><span class="content">mission_id</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n19" name="n19">19</a></span> t.datetime <span class="string"><span class="delimiter">"</span><span class="content">created_at</span><span class="delimiter">"</span></span>, <span class="key">null</span>: <span class="predefined-constant">false</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><strong><a href="#n20" name="n20">20</a></strong></span> t.datetime <span class="string"><span class="delimiter">"</span><span class="content">updated_at</span><span class="delimiter">"</span></span>, <span class="key">null</span>: <span class="predefined-constant">false</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n21" name="n21">21</a></span> t.integer <span class="string"><span class="delimiter">"</span><span class="content">user_id</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n22" name="n22">22</a></span> <span class="keyword">end</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n23" name="n23">23</a></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n24" name="n24">24</a></span> add_index <span class="string"><span class="delimiter">"</span><span class="content">comments</span><span class="delimiter">"</span></span>, [<span class="string"><span class="delimiter">"</span><span class="content">mission_id</span><span class="delimiter">"</span></span>], <span class="key">name</span>: <span class="string"><span class="delimiter">"</span><span class="content">index_comments_on_mission_id</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n25" name="n25">25</a></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
<ul>
|
|
|
|
<li>always add db index (missions => [project_id]) » rails_best_practices</li>
|
|
|
|
</ul>
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n26" name="n26">26</a></span> create_table <span class="string"><span class="delimiter">"</span><span class="content">missions</span><span class="delimiter">"</span></span>, <span class="key">force</span>: <span class="symbol">:cascade</span> <span class="keyword">do</span> |t|
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n27" name="n27">27</a></span> t.string <span class="string"><span class="delimiter">"</span><span class="content">name</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n28" name="n28">28</a></span> t.datetime <span class="string"><span class="delimiter">"</span><span class="content">deadline</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n29" name="n29">29</a></span> t.integer <span class="string"><span class="delimiter">"</span><span class="content">priority</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><strong><a href="#n30" name="n30">30</a></strong></span> t.integer <span class="string"><span class="delimiter">"</span><span class="content">status</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n31" name="n31">31</a></span> t.datetime <span class="string"><span class="delimiter">"</span><span class="content">created_at</span><span class="delimiter">"</span></span>, <span class="key">null</span>: <span class="predefined-constant">false</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n32" name="n32">32</a></span> t.datetime <span class="string"><span class="delimiter">"</span><span class="content">updated_at</span><span class="delimiter">"</span></span>, <span class="key">null</span>: <span class="predefined-constant">false</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n33" name="n33">33</a></span> t.string <span class="string"><span class="delimiter">"</span><span class="content">content</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n34" name="n34">34</a></span> t.integer <span class="string"><span class="delimiter">"</span><span class="content">project_id</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n35" name="n35">35</a></span> <span class="keyword">end</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n36" name="n36">36</a></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
<ul>
|
|
|
|
<li>always add db index (missions_users => [mission_id]) » rails_best_practices</li>
|
|
|
|
<li>always add db index (missions_users => [user_id]) » rails_best_practices</li>
|
|
|
|
</ul>
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n37" name="n37">37</a></span> create_table <span class="string"><span class="delimiter">"</span><span class="content">missions_users</span><span class="delimiter">"</span></span>, <span class="key">id</span>: <span class="predefined-constant">false</span>, <span class="key">force</span>: <span class="symbol">:cascade</span> <span class="keyword">do</span> |t|
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n38" name="n38">38</a></span> t.integer <span class="string"><span class="delimiter">"</span><span class="content">mission_id</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n39" name="n39">39</a></span> t.integer <span class="string"><span class="delimiter">"</span><span class="content">user_id</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><strong><a href="#n40" name="n40">40</a></strong></span> <span class="keyword">end</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n41" name="n41">41</a></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
<ul>
|
|
|
|
<li>always add db index (notes => [project_id]) » rails_best_practices</li>
|
|
|
|
</ul>
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n42" name="n42">42</a></span> create_table <span class="string"><span class="delimiter">"</span><span class="content">notes</span><span class="delimiter">"</span></span>, <span class="key">force</span>: <span class="symbol">:cascade</span> <span class="keyword">do</span> |t|
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n43" name="n43">43</a></span> t.string <span class="string"><span class="delimiter">"</span><span class="content">content</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n44" name="n44">44</a></span> t.integer <span class="string"><span class="delimiter">"</span><span class="content">user_id</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n45" name="n45">45</a></span> t.datetime <span class="string"><span class="delimiter">"</span><span class="content">created_at</span><span class="delimiter">"</span></span>, <span class="key">null</span>: <span class="predefined-constant">false</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n46" name="n46">46</a></span> t.datetime <span class="string"><span class="delimiter">"</span><span class="content">updated_at</span><span class="delimiter">"</span></span>, <span class="key">null</span>: <span class="predefined-constant">false</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n47" name="n47">47</a></span> t.integer <span class="string"><span class="delimiter">"</span><span class="content">project_id</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n48" name="n48">48</a></span> t.integer <span class="string"><span class="delimiter">"</span><span class="content">category</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n49" name="n49">49</a></span> <span class="keyword">end</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><strong><a href="#n50" name="n50">50</a></strong></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n51" name="n51">51</a></span> add_index <span class="string"><span class="delimiter">"</span><span class="content">notes</span><span class="delimiter">"</span></span>, [<span class="string"><span class="delimiter">"</span><span class="content">user_id</span><span class="delimiter">"</span></span>], <span class="key">name</span>: <span class="string"><span class="delimiter">"</span><span class="content">index_notes_on_user_id</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n52" name="n52">52</a></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n53" name="n53">53</a></span> create_table <span class="string"><span class="delimiter">"</span><span class="content">projects</span><span class="delimiter">"</span></span>, <span class="key">force</span>: <span class="symbol">:cascade</span> <span class="keyword">do</span> |t|
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n54" name="n54">54</a></span> t.string <span class="string"><span class="delimiter">"</span><span class="content">name</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n55" name="n55">55</a></span> t.string <span class="string"><span class="delimiter">"</span><span class="content">content</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n56" name="n56">56</a></span> t.datetime <span class="string"><span class="delimiter">"</span><span class="content">created_at</span><span class="delimiter">"</span></span>, <span class="key">null</span>: <span class="predefined-constant">false</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n57" name="n57">57</a></span> t.datetime <span class="string"><span class="delimiter">"</span><span class="content">updated_at</span><span class="delimiter">"</span></span>, <span class="key">null</span>: <span class="predefined-constant">false</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n58" name="n58">58</a></span> <span class="keyword">end</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n59" name="n59">59</a></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
<ul>
|
|
|
|
<li>always add db index (projects_users => [project_id]) » rails_best_practices</li>
|
|
|
|
<li>always add db index (projects_users => [user_id]) » rails_best_practices</li>
|
|
|
|
</ul>
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><strong><a href="#n60" name="n60">60</a></strong></span> create_table <span class="string"><span class="delimiter">"</span><span class="content">projects_users</span><span class="delimiter">"</span></span>, <span class="key">id</span>: <span class="predefined-constant">false</span>, <span class="key">force</span>: <span class="symbol">:cascade</span> <span class="keyword">do</span> |t|
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n61" name="n61">61</a></span> t.integer <span class="string"><span class="delimiter">"</span><span class="content">project_id</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n62" name="n62">62</a></span> t.integer <span class="string"><span class="delimiter">"</span><span class="content">user_id</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n63" name="n63">63</a></span> <span class="keyword">end</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n64" name="n64">64</a></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
<ul>
|
|
|
|
<li>always add db index (shares => [project_id]) » rails_best_practices</li>
|
|
|
|
<li>always add db index (shares => [user_id]) » rails_best_practices</li>
|
|
|
|
</ul>
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n65" name="n65">65</a></span> create_table <span class="string"><span class="delimiter">"</span><span class="content">shares</span><span class="delimiter">"</span></span>, <span class="key">force</span>: <span class="symbol">:cascade</span> <span class="keyword">do</span> |t|
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n66" name="n66">66</a></span> t.string <span class="string"><span class="delimiter">"</span><span class="content">content</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n67" name="n67">67</a></span> t.datetime <span class="string"><span class="delimiter">"</span><span class="content">created_at</span><span class="delimiter">"</span></span>, <span class="key">null</span>: <span class="predefined-constant">false</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n68" name="n68">68</a></span> t.datetime <span class="string"><span class="delimiter">"</span><span class="content">updated_at</span><span class="delimiter">"</span></span>, <span class="key">null</span>: <span class="predefined-constant">false</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n69" name="n69">69</a></span> t.integer <span class="string"><span class="delimiter">"</span><span class="content">project_id</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><strong><a href="#n70" name="n70">70</a></strong></span> t.integer <span class="string"><span class="delimiter">"</span><span class="content">user_id</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n71" name="n71">71</a></span> <span class="keyword">end</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n72" name="n72">72</a></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n73" name="n73">73</a></span> create_table <span class="string"><span class="delimiter">"</span><span class="content">users</span><span class="delimiter">"</span></span>, <span class="key">force</span>: <span class="symbol">:cascade</span> <span class="keyword">do</span> |t|
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n74" name="n74">74</a></span> t.string <span class="string"><span class="delimiter">"</span><span class="content">name</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n75" name="n75">75</a></span> t.string <span class="string"><span class="delimiter">"</span><span class="content">password_digest</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n76" name="n76">76</a></span> t.string <span class="string"><span class="delimiter">"</span><span class="content">email</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n77" name="n77">77</a></span> t.datetime <span class="string"><span class="delimiter">"</span><span class="content">created_at</span><span class="delimiter">"</span></span>, <span class="key">null</span>: <span class="predefined-constant">false</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n78" name="n78">78</a></span> t.datetime <span class="string"><span class="delimiter">"</span><span class="content">updated_at</span><span class="delimiter">"</span></span>, <span class="key">null</span>: <span class="predefined-constant">false</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n79" name="n79">79</a></span> t.string <span class="string"><span class="delimiter">"</span><span class="content">phone</span><span class="delimiter">"</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><strong><a href="#n80" name="n80">80</a></strong></span> <span class="keyword">end</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n81" name="n81">81</a></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n82" name="n82">82</a></span><span class="keyword">end</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
</body>
|
|
</html>
|