jLinux

Untitled

Dec 25th, 2015
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // File: seeds/dev/operating_systems.js
  2.  
  3. 'use strict';
  4.  
  5. exports.seed = function( knex, Promise ) {
  6.     let table = 'operating_systems';
  7.  
  8.     return Promise.join(
  9.         // Removing the deletion, to avoid constraint errors
  10.         // (until we can get the insert working)
  11.         //knex( table ).del(),
  12.  
  13.         knex.insert([
  14.             { created_at: knex.fn.now(), type: 'linux',     flavor: 'Ubuntu', release: '7.10', code_name: 'gutsy', description: 'Ubuntu 7.10'                },
  15.             { created_at: knex.fn.now(), type: 'linux',     flavor: 'CentOS', release: '6.7',  code_name: null,    description: 'CentOS release 6.7 (Final)' },
  16.             { created_at: knex.fn.now(), type: 'linux',     flavor: 'RedHat', release: '6',    code_name: null,    description: 'RedHat Enterprise Linux 6'  },
  17.             { created_at: knex.fn.now(), type: 'microsoft', flavor: '2008',   release: 'r2',   code_name: null,    description: 'Windows Server 2008 r2'     }
  18.         ]).into( table )
  19.     );
  20. };
Advertisement
Add Comment
Please, Sign In to add comment