mirror of
https://github.com/zen-browser/rices.git
synced 2025-07-08 01:10:12 +02:00
shared refactor
This commit is contained in:
parent
49b7ba2c78
commit
079cde591e
16 changed files with 6592 additions and 90 deletions
|
@ -1,8 +1,9 @@
|
|||
--DROP TABLE IF EXISTS rices;
|
||||
|
||||
CREATE TABLE rices (
|
||||
CREATE TABLE shared (
|
||||
id UUID NOT NULL, -- Unique identifier
|
||||
slug VARCHAR(75) NOT NULL, -- Unique user-friendly identifier
|
||||
type INTEGER DEFAULT 0 NOT NULL, -- Type: 1-WORKSPACE 2-RICE
|
||||
version VARCHAR(10) NOT NULL, -- Data version
|
||||
os VARCHAR(30) NOT NULL, -- Operating system
|
||||
name VARCHAR(75) NOT NULL, -- Name of the rice
|
||||
|
@ -19,7 +20,7 @@ CREATE TABLE rices (
|
|||
CREATE OR REPLACE FUNCTION increment_visits(slug_param TEXT)
|
||||
RETURNS VOID AS $$
|
||||
BEGIN
|
||||
UPDATE rices
|
||||
UPDATE shared
|
||||
SET visits = visits + 1
|
||||
WHERE slug = slug_param;
|
||||
END;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue