<commit_before>CREATE DATABASE opbeans IF NOT EXISTS;

# Drop everything
ALTER TABLE "products" DROP CONSTRAINT IF EXISTS "products_fk0";
ALTER TABLE "orders" DROP CONSTRAINT IF EXISTS "orders_fk0";
ALTER TABLE "order_products" DROP CONSTRAINT IF EXISTS "order_products_fk0";
ALTER TABLE "order_products" DROP CONSTRAINT IF EXISTS "order_products_fk1";

DROP TABLE IF EXISTS "products";
DROP TABLE IF EXISTS "product_types";
DROP TABLE IF EXISTS "customers";
DROP TABLE IF EXISTS "orders";
DROP TABLE IF EXISTS "order_products";


# Create everything
CREATE TABLE "products" (
	"id" serial NOT NULL,
	"sku" varchar NOT NULL UNIQUE,
	"name" varchar NOT NULL,
	"description" TEXT NOT NULL,
	"type_id" int NOT NULL,
	"stock" int NOT NULL,
	"cost" int NOT NULL,
	"selling_price" int NOT NULL,
	CONSTRAINT products_pk PRIMARY KEY ("id")
) WITH (
  OIDS=FALSE
);


CREATE TABLE "product_types" (
	"id" serial NOT NULL,
	"name" varchar NOT NULL UNIQUE,
	CONSTRAINT product_types_pk PRIMARY KEY ("id")
) WITH (
  OIDS=FALSE
);


CREATE TABLE "customers" (
	"id" serial NOT NULL,
	"full_name" varchar NOT NULL,
	"company_name" varchar NOT NULL,<commit_msg>Fix comments in SQL file<commit_after>CREATE DATABASE opbeans IF NOT EXISTS;

-- Drop everything
ALTER TABLE "products" DROP CONSTRAINT IF EXISTS "products_fk0";
ALTER TABLE "orders" DROP CONSTRAINT IF EXISTS "orders_fk0";
ALTER TABLE "order_products" DROP CONSTRAINT IF EXISTS "order_products_fk0";
ALTER TABLE "order_products" DROP CONSTRAINT IF EXISTS "order_products_fk1";

DROP TABLE IF EXISTS "products";
DROP TABLE IF EXISTS "product_types";
DROP TABLE IF EXISTS "customers";
DROP TABLE IF EXISTS "orders";
DROP TABLE IF EXISTS "order_products";


-- Create everything
CREATE TABLE "products" (
	"id" serial NOT NULL,
	"sku" varchar NOT NULL UNIQUE,
	"name" varchar NOT NULL,
	"description" TEXT NOT NULL,
	"type_id" int NOT NULL,
	"stock" int NOT NULL,
	"cost" int NOT NULL,
	"selling_price" int NOT NULL,
	CONSTRAINT products_pk PRIMARY KEY ("id")
) WITH (
  OIDS=FALSE
);


CREATE TABLE "product_types" (
	"id" serial NOT NULL,
	"name" varchar NOT NULL UNIQUE,
	CONSTRAINT product_types_pk PRIMARY KEY ("id")
) WITH (
  OIDS=FALSE
);


CREATE TABLE "customers" (
	"id" serial NOT NULL,
	"full_name" varchar NOT NULL,
	"company_name" varchar NOT NULL,
{'fraction_non_alphanumeric': 0.09362808842652796, 'fraction_numerical': 0.0034677069787602947, 'mean_word_length': 5.2210242587601075, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1243620', 'n_tokens_mistral': 845, 'n_tokens_neox': 790, 'n_words': 291}