Updating seeds for tests

This commit is contained in:
Karl Hughes 2017-03-24 15:10:16 -05:00
commit 84bb922e71
3 changed files with 12 additions and 2 deletions

View file

@ -29,6 +29,12 @@ DROP TABLE IF EXISTS events CASCADE;
DROP VIEW IF EXISTS tag_usage;
DROP TABLE IF EXISTS products CASCADE;
--
-- Enables the Postgis extension
--
CREATE EXTENSION IF NOT EXISTS postgis;
--
-- Name: categories; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
@ -131,7 +137,8 @@ CREATE TABLE products (
name character varying(255) NOT NULL,
price decimal(10,2) NOT NULL,
properties jsonb NOT NULL,
created_at timestamp NOT NULL
created_at timestamp NOT NULL,
deleted_at timestamp NULL
);
--

View file

@ -107,7 +107,8 @@ CREATE TABLE `products` (
`name` text(255) NOT NULL,
`price` text(12) NOT NULL,
`properties` json NOT NULL,
`created_at` datetime NOT NULL
`created_at` datetime NOT NULL,
`deleted_at` datetime NULL
);
INSERT INTO `products` (`id`, `name`, `price`, `properties`, `created_at`) VALUES (1, 'Calculator', '23.01', '{"depth":false,"model":"TRX-120","width":100,"height":null}', '1970-01-01 01:01:01');