mirror of
https://gitlab.com/niansa/discordlistforbots.git
synced 2025-03-06 20:49:22 +01:00
Fixed data type for votes column
This commit is contained in:
parent
56ccff6a9d
commit
59e5745af1
3 changed files with 6 additions and 6 deletions
8
bots.sql
8
bots.sql
|
@ -21,7 +21,7 @@ SET default_tablespace = '';
|
|||
SET default_table_access_method = heap;
|
||||
|
||||
--
|
||||
-- Name: bots; Type: TABLE; Schema: public; Owner: zdqulpzc
|
||||
-- Name: bots; Type: TABLE; Schema: public; Owner: thisistheusername-replaceme
|
||||
--
|
||||
|
||||
CREATE TABLE public.bots (
|
||||
|
@ -34,16 +34,16 @@ CREATE TABLE public.bots (
|
|||
prefix text,
|
||||
owner_id text,
|
||||
app_id text,
|
||||
votes integer,
|
||||
votes bigint,
|
||||
approved boolean,
|
||||
CONSTRAINT can_vote_check CHECK ((((votes > 0) AND approved) OR (votes < 1)))
|
||||
);
|
||||
|
||||
|
||||
ALTER TABLE public.bots OWNER TO zdqulpzc;
|
||||
ALTER TABLE public.bots OWNER TO thisistheusername-replaceme;
|
||||
|
||||
--
|
||||
-- Data for Name: bots; Type: TABLE DATA; Schema: public; Owner: zdqulpzc
|
||||
-- Data for Name: bots; Type: TABLE DATA; Schema: public; Owner: thisistheusername-replaceme
|
||||
--
|
||||
|
||||
COPY public.bots (name, short_description, long_description, avatar_url, owner, support_server, prefix, owner_id, app_id, votes, approved) FROM stdin;
|
||||
|
|
|
@ -43,7 +43,7 @@ Bot deserializeBot(orm::Row row) {
|
|||
sf(owner).as<std::string>();
|
||||
sf(support_server).as<std::string>();
|
||||
sf(prefix).as<std::string>();
|
||||
sf(votes).as<uint32_t>();
|
||||
sf(votes).as<int64_t>();
|
||||
sf(approved).as<bool>();
|
||||
thisbot.owner_id = std::stoul(row["owner_id"].as<std::string>());
|
||||
thisbot.app_id = std::stoul(row["app_id"].as<std::string>());
|
||||
|
|
|
@ -7,7 +7,7 @@ using namespace std;
|
|||
struct Bot {
|
||||
string name, short_description, long_description, avatar_url, owner, support_server, prefix;
|
||||
uint64_t owner_id, app_id;
|
||||
uint32_t votes = 0;
|
||||
int64_t votes = 0;
|
||||
bool approved = false;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue