Readme

This val is part of the SteamPlaytimeHistory project

This val allows you to create the play_history table to run the project

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { sqlite } from "https://esm.town/v/std/sqlite";
import { sql } from "npm:drizzle-orm";
import { drizzle } from "npm:drizzle-orm/libsql";
import { integer, sqliteTable, text } from "npm:drizzle-orm/sqlite-core";
await sqlite.execute(`CREATE TABLE play_history (
id integer PRIMARY KEY NOT NULL,
date text DEFAULT (CURRENT_TIMESTAMP) NOT NULL,
appid integer NOT NULL,
name text NOT NULL,
playtime_2weeks integer NOT NULL,
playtime_forever integer NOT NULL,
img_icon_url text NOT NULL,
playtime_windows_forever integer NOT NULL,
playtime_mac_forever integer NOT NULL,
playtime_linux_forever integer NOT NULL,
playtime_deck_forever integer NOT NULL
);
`);
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
v6
May 30, 2024