<commit_before>DROP TABLE IF EXISTS users_houses CASCADE;

CREATE TABLE users_houses (
  userId SERIAL PRIMARY KEY,
  houseId INTEGER,
  isHostHouse BOOLEAN DEFAULT FALSE
);

DROP TABLE IF EXISTS houses CASCADE;
    
CREATE TABLE houses (
  id SERIAL PRIMARY KEY,
  houseName VARCHAR,
  inviteCode VARCHAR
);

DROP TABLE IF EXISTS devices CASCADE;
    
CREATE TABLE devices (
  id VARCHAR PRIMARY KEY,
  houseId INTEGER,
  name VARCHAR,
  description VARCHAR,
  isActive BOOLEAN DEFAULT FALSE,
  paidUsage BOOLEAN DEFAULT FALSE,
  hardwareKey VARCHAR,
  hardwareType VARCHAR,
  usageTimeOptions INTEGER,
  usageCostOptions INTEGER,
  deviceCategoryId INTEGER,
  totalTimeSpent INTEGER,
  totalCostSpent INTEGER
);


DROP TABLE IF EXISTS device_category CASCADE;
    
CREATE TABLE device_category (
  id SERIAL PRIMARY KEY,
  name INTEGER,
  defaultTime INTEGER,
  defaultCost INTEGER,
  defaultPhoto INTEGER
);


DROP TABLE IF EXISTS device_transactions CASCADE;
    
CREATE TABLE device_transactions (
  id SERIAL PRIMARY KEY,
  userAccountId INTEGER,
  deviceId VARCHAR,
  amountSpent INTEGER,
  timeSpent INTEGER,
  timeStamp TIMESTAMP default now()
);


DROP TABLE IF EXISTS pay_methods CASCADE;
    
CREATE TABLE pay_methods (
  id SERIAL PRIMARY KEY,
  name VARCHAR
);


DROP TABLE IF EXISTS user_pay_accounts CASCADE;
    <commit_msg>(fix) update device_transactions to store decimal for amountspent<commit_after>DROP TABLE IF EXISTS users_houses CASCADE;

CREATE TABLE users_houses (
  userId SERIAL PRIMARY KEY,
  houseId INTEGER,
  isHostHouse BOOLEAN DEFAULT FALSE
);

DROP TABLE IF EXISTS houses CASCADE;
    
CREATE TABLE houses (
  id SERIAL PRIMARY KEY,
  houseName VARCHAR,
  inviteCode VARCHAR
);

DROP TABLE IF EXISTS devices CASCADE;
    
CREATE TABLE devices (
  id VARCHAR PRIMARY KEY,
  houseId INTEGER,
  name VARCHAR,
  description VARCHAR,
  isActive BOOLEAN DEFAULT FALSE,
  paidUsage BOOLEAN DEFAULT FALSE,
  hardwareKey VARCHAR,
  hardwareType VARCHAR,
  usageTimeOptions INTEGER,
  usageCostOptions INTEGER,
  deviceCategoryId INTEGER,
  totalTimeSpent INTEGER,
  totalCostSpent INTEGER
);


DROP TABLE IF EXISTS device_category CASCADE;
    
CREATE TABLE device_category (
  id SERIAL PRIMARY KEY,
  name INTEGER,
  defaultTime INTEGER,
  defaultCost INTEGER,
  defaultPhoto INTEGER
);


DROP TABLE IF EXISTS device_transactions CASCADE;
    
CREATE TABLE device_transactions (
  id SERIAL PRIMARY KEY,
  userAccountId INTEGER,
  deviceId VARCHAR,
  amountSpent DECIMAL(10,2),
  timeSpent INTEGER,
  timeStamp TIMESTAMP default now()
);


DROP TABLE IF EXISTS pay_methods CASCADE;
    
CREATE TABLE pay_methods (
  id SERIAL PRIMARY KEY,
  name VARCHAR
);


DROP TABLE IF EXISTS user_pay_accounts CASCADE;
    
{'fraction_non_alphanumeric': 0.0427007299270073, 'fraction_numerical': 0.0010948905109489052, 'mean_word_length': 4.191287878787879, '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': '7357706', 'n_tokens_mistral': 954, 'n_tokens_neox': 839, 'n_words': 295}