Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Navicat Premium Data Transfer
- Source Server : IPCAM
- Source Server Type : PostgreSQL
- Source Server Version : 90405
- Source Host : localhost
- Source Database : trex
- Source Schema : public
- Target Server Type : PostgreSQL
- Target Server Version : 90405
- File Encoding : utf-8
- Date: 04/07/2017 10:04:45 AM
- */
- -- ----------------------------
- -- Sequence structure for accounts_id_seq
- -- ----------------------------
- DROP SEQUENCE IF EXISTS "accounts_id_seq";
- CREATE SEQUENCE "accounts_id_seq" INCREMENT 1 START 3 MAXVALUE 9223372036854775807 MINVALUE 1 CACHE 1;
- ALTER TABLE "accounts_id_seq" OWNER TO "postgres";
- -- ----------------------------
- -- Sequence structure for authors_id_seq
- -- ----------------------------
- DROP SEQUENCE IF EXISTS "authors_id_seq";
- CREATE SEQUENCE "authors_id_seq" INCREMENT 1 START 6 MAXVALUE 9223372036854775807 MINVALUE 1 CACHE 1;
- ALTER TABLE "authors_id_seq" OWNER TO "postgres";
- -- ----------------------------
- -- Sequence structure for books_id_seq
- -- ----------------------------
- DROP SEQUENCE IF EXISTS "books_id_seq";
- CREATE SEQUENCE "books_id_seq" INCREMENT 1 START 9 MAXVALUE 9223372036854775807 MINVALUE 1 CACHE 1;
- ALTER TABLE "books_id_seq" OWNER TO "postgres";
- -- ----------------------------
- -- Sequence structure for carts_id_seq
- -- ----------------------------
- DROP SEQUENCE IF EXISTS "carts_id_seq";
- CREATE SEQUENCE "carts_id_seq" INCREMENT 1 START 36 MAXVALUE 9223372036854775807 MINVALUE 1 CACHE 1;
- ALTER TABLE "carts_id_seq" OWNER TO "postgres";
- -- ----------------------------
- -- Sequence structure for categories_id_seq
- -- ----------------------------
- DROP SEQUENCE IF EXISTS "categories_id_seq";
- CREATE SEQUENCE "categories_id_seq" INCREMENT 1 START 8 MAXVALUE 9223372036854775807 MINVALUE 1 CACHE 1;
- ALTER TABLE "categories_id_seq" OWNER TO "postgres";
- -- ----------------------------
- -- Sequence structure for checkout_detail_id_seq
- -- ----------------------------
- DROP SEQUENCE IF EXISTS "checkout_detail_id_seq";
- CREATE SEQUENCE "checkout_detail_id_seq" INCREMENT 1 START 2 MAXVALUE 9223372036854775807 MINVALUE 1 CACHE 1;
- ALTER TABLE "checkout_detail_id_seq" OWNER TO "postgres";
- -- ----------------------------
- -- Sequence structure for checkouts_id_seq
- -- ----------------------------
- DROP SEQUENCE IF EXISTS "checkouts_id_seq";
- CREATE SEQUENCE "checkouts_id_seq" INCREMENT 1 START 2 MAXVALUE 9223372036854775807 MINVALUE 1 CACHE 1;
- ALTER TABLE "checkouts_id_seq" OWNER TO "postgres";
- -- ----------------------------
- -- Sequence structure for user_profile_id_seq
- -- ----------------------------
- DROP SEQUENCE IF EXISTS "user_profile_id_seq";
- CREATE SEQUENCE "user_profile_id_seq" INCREMENT 1 START 1 MAXVALUE 9223372036854775807 MINVALUE 1 CACHE 1;
- ALTER TABLE "user_profile_id_seq" OWNER TO "postgres";
- -- ----------------------------
- -- Sequence structure for who_we_are_id_seq
- -- ----------------------------
- DROP SEQUENCE IF EXISTS "who_we_are_id_seq";
- CREATE SEQUENCE "who_we_are_id_seq" INCREMENT 1 START 1 MAXVALUE 9223372036854775807 MINVALUE 1 CACHE 1;
- ALTER TABLE "who_we_are_id_seq" OWNER TO "postgres";
- -- ----------------------------
- -- Table structure for accounts
- -- ----------------------------
- DROP TABLE IF EXISTS "accounts";
- CREATE TABLE "accounts" (
- "id" int4 NOT NULL DEFAULT nextval('accounts_id_seq'::regclass),
- "email" varchar(255) COLLATE "default",
- "password" text COLLATE "default",
- "role" int4,
- "status" bool NOT NULL DEFAULT false,
- "inserted_at" timestamp(6) NOT NULL,
- "updated_at" timestamp(6) NOT NULL
- )
- WITH (OIDS=FALSE);
- ALTER TABLE "accounts" OWNER TO "postgres";
- -- ----------------------------
- -- Records of accounts
- -- ----------------------------
- BEGIN;
- INSERT INTO "accounts" VALUES ('2', 'dara@gmail.com', '$2b$12$YBCKQ/ivzYgxBioWIuoKp.rsgcic/3T7ZttCv60I2gKbEPc5NeF5a', '1', 't', '2017-04-01 14:59:25.080884', '2017-04-01 14:59:25.080899');
- INSERT INTO "accounts" VALUES ('1', 'thanak@gmail.com', '$2b$12$YBCKQ/ivzYgxBioWIuoKp.rsgcic/3T7ZttCv60I2gKbEPc5NeF5a', '1', 't', '2017-10-02 00:00:00', '2017-12-03 00:00:00');
- INSERT INTO "accounts" VALUES ('3', 'thay@gmail.com', '$2b$12$nahMeo8KY/zfGwDndEtxluXglKbfCVdS22KIJ2w3RHHzI1qOCLVKa', '1', 't', '2017-04-05 14:40:31.751864', '2017-04-05 14:40:31.978565');
- COMMIT;
- -- ----------------------------
- -- Table structure for authors
- -- ----------------------------
- DROP TABLE IF EXISTS "authors";
- CREATE TABLE "authors" (
- "id" int4 NOT NULL DEFAULT nextval('authors_id_seq'::regclass),
- "firstname" varchar(255) COLLATE "default",
- "lastname" varchar(255) COLLATE "default",
- "position" varchar(255) COLLATE "default",
- "description" text COLLATE "default",
- "photo" text COLLATE "default",
- "status" bool NOT NULL DEFAULT false,
- "inserted_at" timestamp(6) NOT NULL,
- "updated_at" timestamp(6) NOT NULL
- )
- WITH (OIDS=FALSE);
- ALTER TABLE "authors" OWNER TO "postgres";
- -- ----------------------------
- -- Records of authors
- -- ----------------------------
- BEGIN;
- INSERT INTO "authors" VALUES ('4', 'Barac ', 'Obama', 'Priminister', 'Priminister of USA', '4c8ac96a-19a7-11e7-87b7-e0db559fd419.jpg', 't', '2017-04-05 02:26:39.249539', '2017-04-05 02:26:39.249553');
- INSERT INTO "authors" VALUES ('5', 'Warrent ', 'Buffet', 'good', 'good', '59f598d2-19a7-11e7-9499-e0db559fd419.jpg', 't', '2017-04-05 02:27:01.759579', '2017-04-05 02:27:01.759591');
- INSERT INTO "authors" VALUES ('3', 'kelvin', 'klen1', 'author', 'good', '36b68548-19b1-11e7-9367-e0db559fd419.jpg', 't', '2017-04-05 02:22:54.255188', '2017-04-05 03:37:37.634103');
- COMMIT;
- -- ----------------------------
- -- Table structure for books
- -- ----------------------------
- DROP TABLE IF EXISTS "books";
- CREATE TABLE "books" (
- "id" int4 NOT NULL DEFAULT nextval('books_id_seq'::regclass),
- "title" varchar(255) COLLATE "default",
- "isbn" varchar(255) COLLATE "default",
- "price" float8,
- "unit" int4,
- "publisher_name" varchar(255) COLLATE "default",
- "published_year" varchar(255) COLLATE "default",
- "page_count" varchar(255) COLLATE "default",
- "language" varchar(255) COLLATE "default",
- "shipping_weight" float8,
- "book_dimensions" varchar(255) COLLATE "default",
- "status" int4,
- "image" text COLLATE "default",
- "description" text COLLATE "default",
- "author_name" varchar(255) COLLATE "default",
- "is_feature" bool NOT NULL DEFAULT false,
- "category_id" int4,
- "author_id" int4,
- "inserted_at" timestamp(6) NOT NULL,
- "updated_at" timestamp(6) NOT NULL
- )
- WITH (OIDS=FALSE);
- ALTER TABLE "books" OWNER TO "postgres";
- -- ----------------------------
- -- Records of books
- -- ----------------------------
- BEGIN;
- INSERT INTO "books" VALUES ('1', 'Barac Obama', '344552', '21', '23', 'Kevin', '2013', '23', 'en', '234', '23', '1', 'd25b3a28-1913-11e7-aa75-e0db559fd419.jpg', 'good in comment', 'Stev Job', 't', '5', '1', '2017-04-04 08:50:58.431822', '2017-04-04 08:50:58.445931');
- INSERT INTO "books" VALUES ('4', 'Barac Obama', '1234', '21', '12', 'Barac Obama', '2013', '234', 'en', '21', '45', '1', '5cc8633e-1914-11e7-90e5-e0db559fd419.jpg', 'good in stock', 'Stev Job', 't', '7', '1', '2017-04-04 08:54:50.479015', '2017-04-04 08:54:50.479026');
- INSERT INTO "books" VALUES ('5', 'The speed of though', '12345', '21', '213', 'Bill', '2012', '234', 'en', '12', '2', '1', '84107e18-1914-11e7-9a07-e0db559fd419.jpg', 'good condition', 'Bill Gate', 'f', '6', '2', '2017-04-04 08:55:56.387071', '2017-04-04 08:55:56.387097');
- INSERT INTO "books" VALUES ('3', 'Stev Job', '123', '32', '0', 'Stev Job', '2013', '123', 'en', '34', '34', '1', '22814344-1914-11e7-b2f9-e0db559fd419.jpg', 'good in comment', 'Stev Job', 't', '5', '1', '2017-04-04 08:53:12.706405', '2017-04-04 14:02:46.670792');
- INSERT INTO "books" VALUES ('8', 'Tap dance', '23445', '23', '43', 'Kid ', '2013', '23', 'en', '12', '23', '1', '0ce08882-1915-11e7-ac34-e0db559fd419.jpg', 'for bussiness', 'Stev Job', 'f', '5', '1', '2017-04-04 08:59:45.915546', '2017-04-05 03:45:56.94916');
- INSERT INTO "books" VALUES ('7', 'Security Analysis', '1234', '21', '30', 'King vay', '2012', '123', 'en', '13', '34', '1', 'd4c5b53a-1914-11e7-b957-e0db559fd419.jpg', 'gepedia care', 'Stev Job', 'f', '5', '1', '2017-04-04 08:58:11.797465', '2017-04-05 03:47:39.763147');
- INSERT INTO "books" VALUES ('2', 'Bill Gate Book', '4555555', '4', '42', 'Bill Gate', '2015', '32', 'en', '1', '44', '1', 'f98cded0-1913-11e7-8989-e0db559fd419.jpg', 'good in stock', 'Bill Gate', 't', '7', '2', '2017-04-04 08:52:03.994331', '2017-04-05 07:06:38.972877');
- INSERT INTO "books" VALUES ('9', 'The road a head', '12345', '21', '31', 'dARA', '2014', '34', 'en', '43', '43', '1', 'd0a8aa06-19ce-11e7-957e-e0db559fd419.jpg', 'ddfff', 'Barac Obama', 'f', '5', '4', '2017-04-05 07:09:31.445709', '2017-04-06 06:29:44.348993');
- COMMIT;
- -- ----------------------------
- -- Table structure for carts
- -- ----------------------------
- DROP TABLE IF EXISTS "carts";
- CREATE TABLE "carts" (
- "id" int4 NOT NULL DEFAULT nextval('carts_id_seq'::regclass),
- "price" float8,
- "unit" int4,
- "status" int4,
- "account_id" int4,
- "book_id" int4,
- "inserted_at" timestamp(6) NOT NULL,
- "updated_at" timestamp(6) NOT NULL
- )
- WITH (OIDS=FALSE);
- ALTER TABLE "carts" OWNER TO "postgres";
- -- ----------------------------
- -- Records of carts
- -- ----------------------------
- BEGIN;
- INSERT INTO "carts" VALUES ('35', '4', '1', '1', '2', '2', '2017-04-05 07:06:39.164075', '2017-04-05 07:06:39.164091');
- INSERT INTO "carts" VALUES ('36', '21', '1', '1', '2', '9', '2017-04-06 06:29:44.898988', '2017-04-06 06:29:44.899012');
- COMMIT;
- -- ----------------------------
- -- Table structure for categories
- -- ----------------------------
- DROP TABLE IF EXISTS "categories";
- CREATE TABLE "categories" (
- "id" int4 NOT NULL DEFAULT nextval('categories_id_seq'::regclass),
- "name" varchar(255) COLLATE "default",
- "description" text COLLATE "default",
- "status" bool NOT NULL DEFAULT false,
- "inserted_at" timestamp(6) NOT NULL,
- "updated_at" timestamp(6) NOT NULL
- )
- WITH (OIDS=FALSE);
- ALTER TABLE "categories" OWNER TO "postgres";
- -- ----------------------------
- -- Records of categories
- -- ----------------------------
- BEGIN;
- INSERT INTO "categories" VALUES ('5', 'Hello', 'good', 't', '2017-04-01 15:54:11.432782', '2017-04-01 15:54:11.432794');
- INSERT INTO "categories" VALUES ('8', 'Pixx', 'khmer', 'f', '2017-04-02 15:05:59.486206', '2017-04-02 15:05:59.486221');
- INSERT INTO "categories" VALUES ('4', 'Book khmer', 'hello', 'f', '2017-04-01 15:53:59.086816', '2017-04-03 01:29:52.005699');
- INSERT INTO "categories" VALUES ('7', 'Nokia', 'khmer', 't', '2017-04-02 14:32:51.020503', '2017-04-03 06:20:12.764749');
- INSERT INTO "categories" VALUES ('6', 'Samsung', 'korea', 't', '2017-04-01 15:54:37.200098', '2017-04-03 06:20:22.357196');
- COMMIT;
- -- ----------------------------
- -- Table structure for checkout_detail
- -- ----------------------------
- DROP TABLE IF EXISTS "checkout_detail";
- CREATE TABLE "checkout_detail" (
- "id" int4 NOT NULL DEFAULT nextval('checkout_detail_id_seq'::regclass),
- "unit" int4,
- "price" float8,
- "checkout_id" int4,
- "book_id" int4,
- "inserted_at" timestamp(6) NOT NULL,
- "updated_at" timestamp(6) NOT NULL
- )
- WITH (OIDS=FALSE);
- ALTER TABLE "checkout_detail" OWNER TO "postgres";
- -- ----------------------------
- -- Records of checkout_detail
- -- ----------------------------
- BEGIN;
- INSERT INTO "checkout_detail" VALUES ('1', '2', '32', '1', '3', '2017-04-04 02:03:59.714535', '2017-04-04 02:03:59.714548');
- INSERT INTO "checkout_detail" VALUES ('2', '1', '21', '2', '7', '2017-04-05 03:51:18.94627', '2017-04-05 03:51:18.946308');
- COMMIT;
- -- ----------------------------
- -- Table structure for checkouts
- -- ----------------------------
- DROP TABLE IF EXISTS "checkouts";
- CREATE TABLE "checkouts" (
- "id" int4 NOT NULL DEFAULT nextval('checkouts_id_seq'::regclass),
- "account_id" int4,
- "status" int4,
- "inserted_at" timestamp(6) NOT NULL,
- "updated_at" timestamp(6) NOT NULL
- )
- WITH (OIDS=FALSE);
- ALTER TABLE "checkouts" OWNER TO "postgres";
- -- ----------------------------
- -- Records of checkouts
- -- ----------------------------
- BEGIN;
- INSERT INTO "checkouts" VALUES ('2', '2', '1', '2017-04-05 03:51:18.102568', '2017-04-05 03:51:18.102578');
- COMMIT;
- -- ----------------------------
- -- Table structure for schema_migrations
- -- ----------------------------
- DROP TABLE IF EXISTS "schema_migrations";
- CREATE TABLE "schema_migrations" (
- "version" int8 NOT NULL,
- "inserted_at" timestamp(6) NULL
- )
- WITH (OIDS=FALSE);
- ALTER TABLE "schema_migrations" OWNER TO "postgres";
- -- ----------------------------
- -- Records of schema_migrations
- -- ----------------------------
- BEGIN;
- INSERT INTO "schema_migrations" VALUES ('20170316011043', '2017-04-01 08:55:52.799873');
- INSERT INTO "schema_migrations" VALUES ('20170317002148', '2017-04-01 08:55:52.972182');
- INSERT INTO "schema_migrations" VALUES ('20170317041415', '2017-04-01 08:55:53.095104');
- INSERT INTO "schema_migrations" VALUES ('20170317042013', '2017-04-01 08:55:53.206462');
- INSERT INTO "schema_migrations" VALUES ('20170321073039', '2017-04-01 08:55:53.373731');
- INSERT INTO "schema_migrations" VALUES ('20170321074214', '2017-04-01 08:55:53.541806');
- INSERT INTO "schema_migrations" VALUES ('20170323071959', '2017-04-01 08:55:53.663742');
- INSERT INTO "schema_migrations" VALUES ('20170323083020', '2017-04-01 08:55:53.809065');
- INSERT INTO "schema_migrations" VALUES ('20170401080309', '2017-04-01 08:55:53.954362');
- INSERT INTO "schema_migrations" VALUES ('20170403043228', '2017-04-03 06:51:43.635016');
- INSERT INTO "schema_migrations" VALUES ('20170404042832', '2017-04-04 08:30:46.090945');
- INSERT INTO "schema_migrations" VALUES ('20170404080718', '2017-04-04 08:30:46.290905');
- COMMIT;
- -- ----------------------------
- -- Table structure for user_profile
- -- ----------------------------
- DROP TABLE IF EXISTS "user_profile";
- CREATE TABLE "user_profile" (
- "id" int4 NOT NULL DEFAULT nextval('user_profile_id_seq'::regclass),
- "firstname" varchar(255) COLLATE "default",
- "lastname" varchar(255) COLLATE "default",
- "address" varchar(255) COLLATE "default",
- "photo" varchar(255) COLLATE "default",
- "status" bool NOT NULL DEFAULT false,
- "phone" varchar(255) COLLATE "default",
- "account_id" int4,
- "inserted_at" timestamp(6) NOT NULL,
- "updated_at" timestamp(6) NOT NULL
- )
- WITH (OIDS=FALSE);
- ALTER TABLE "user_profile" OWNER TO "postgres";
- -- ----------------------------
- -- Records of user_profile
- -- ----------------------------
- BEGIN;
- INSERT INTO "user_profile" VALUES ('1', 'thanak', 'chan', 'thanak@gmail.com', 'thanak.jpg', 't', '876543', '2', '2017-11-01 00:00:00', '2017-12-02 00:00:00');
- COMMIT;
- -- ----------------------------
- -- Table structure for who_we_are
- -- ----------------------------
- DROP TABLE IF EXISTS "who_we_are";
- CREATE TABLE "who_we_are" (
- "id" int4 NOT NULL DEFAULT nextval('who_we_are_id_seq'::regclass),
- "our_mission" text COLLATE "default",
- "our_mission_photo" text COLLATE "default",
- "what_we_do" text COLLATE "default",
- "what_we_do_photo" text COLLATE "default",
- "our_product" text COLLATE "default",
- "our_product_photo" text COLLATE "default",
- "inserted_at" timestamp(6) NOT NULL,
- "updated_at" timestamp(6) NOT NULL
- )
- WITH (OIDS=FALSE);
- ALTER TABLE "who_we_are" OWNER TO "postgres";
- -- ----------------------------
- -- Alter sequences owned by
- -- ----------------------------
- ALTER SEQUENCE "accounts_id_seq" RESTART 4 OWNED BY "accounts"."id";
- ALTER SEQUENCE "authors_id_seq" RESTART 7 OWNED BY "authors"."id";
- ALTER SEQUENCE "books_id_seq" RESTART 10 OWNED BY "books"."id";
- ALTER SEQUENCE "carts_id_seq" RESTART 37 OWNED BY "carts"."id";
- ALTER SEQUENCE "categories_id_seq" RESTART 9 OWNED BY "categories"."id";
- ALTER SEQUENCE "checkout_detail_id_seq" RESTART 3 OWNED BY "checkout_detail"."id";
- ALTER SEQUENCE "checkouts_id_seq" RESTART 3 OWNED BY "checkouts"."id";
- ALTER SEQUENCE "user_profile_id_seq" RESTART 2 OWNED BY "user_profile"."id";
- ALTER SEQUENCE "who_we_are_id_seq" RESTART 2 OWNED BY "who_we_are"."id";
- -- ----------------------------
- -- Primary key structure for table accounts
- -- ----------------------------
- ALTER TABLE "accounts" ADD PRIMARY KEY ("id") NOT DEFERRABLE INITIALLY IMMEDIATE;
- -- ----------------------------
- -- Primary key structure for table authors
- -- ----------------------------
- ALTER TABLE "authors" ADD PRIMARY KEY ("id") NOT DEFERRABLE INITIALLY IMMEDIATE;
- -- ----------------------------
- -- Primary key structure for table books
- -- ----------------------------
- ALTER TABLE "books" ADD PRIMARY KEY ("id") NOT DEFERRABLE INITIALLY IMMEDIATE;
- -- ----------------------------
- -- Primary key structure for table carts
- -- ----------------------------
- ALTER TABLE "carts" ADD PRIMARY KEY ("id") NOT DEFERRABLE INITIALLY IMMEDIATE;
- -- ----------------------------
- -- Primary key structure for table categories
- -- ----------------------------
- ALTER TABLE "categories" ADD PRIMARY KEY ("id") NOT DEFERRABLE INITIALLY IMMEDIATE;
- -- ----------------------------
- -- Primary key structure for table checkout_detail
- -- ----------------------------
- ALTER TABLE "checkout_detail" ADD PRIMARY KEY ("id") NOT DEFERRABLE INITIALLY IMMEDIATE;
- -- ----------------------------
- -- Primary key structure for table checkouts
- -- ----------------------------
- ALTER TABLE "checkouts" ADD PRIMARY KEY ("id") NOT DEFERRABLE INITIALLY IMMEDIATE;
- -- ----------------------------
- -- Primary key structure for table schema_migrations
- -- ----------------------------
- ALTER TABLE "schema_migrations" ADD PRIMARY KEY ("version") NOT DEFERRABLE INITIALLY IMMEDIATE;
- -- ----------------------------
- -- Primary key structure for table user_profile
- -- ----------------------------
- ALTER TABLE "user_profile" ADD PRIMARY KEY ("id") NOT DEFERRABLE INITIALLY IMMEDIATE;
- -- ----------------------------
- -- Primary key structure for table who_we_are
- -- ----------------------------
- ALTER TABLE "who_we_are" ADD PRIMARY KEY ("id") NOT DEFERRABLE INITIALLY IMMEDIATE;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement