title: Best way to store a versioning number (e.g. 1, 1.1, 1.11, 1.11.1) in a column?
body: <p>I need to store the success criteria tree of the WCAG in my Rails app: <a href="https://www.w3.org/TR/WCAG20/" rel="nofollow noreferrer">https://www.w3.org/TR/WCAG20/</a></p>
  
  <p>So far, all success criteria have been taken from the WCAG 2.0. Now, some more success criteria were added as WCAG 2.1, and I need to store those, too, and be able to separate them from WCAG 2.0.</p>
  
  <p>So I want to add a <code>wcag</code> field to the table, and add the value <code>2.0</code> to the existing success criteria. Then I want to add the new success criteria with value <code>2.1</code>.</p>
  
  <p>First I wanted to use a normal float, but then I realised that versioning numbers have a different logic:</p>
  
  <ul>
  <li>For floats this holds true: <code>1.11 &lt; 1.2</code></li>
  <li>For versioning numbers, its the opposite: <code>1.11 &gt; 1.2</code></li>
  </ul>
  
  <p>How can I store this special kind of data in the DB? Preferably while retaining methods like <code>max</code> and <code>min</code>, and easy ways to compare them with each other (<code>&lt;</code>, <code>&gt;=</code>, etc.)?</p>