File size: 332 Bytes
f5071ca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* eslint-disable camelcase */

exports.shorthands = undefined;

exports.up = (pgm) => {
	pgm.sql(`
    CREATE TABLE carts(
        id SERIAL PRIMARY KEY,
        user_id INTEGER REFERENCES users(id),
        products_id INTEGER REFERENCES products(id)
    );
    `);
};

exports.down = (pgm) => {
	pgm.sql(`DROP TABLE carts;`);
};