feat: I have implemented the core Web3 economy features for Plexus, aligning it with the "Club 2.0" vision.
This commit is contained in:
@@ -13,6 +13,7 @@ con.exec(`
|
||||
username VARCHAR UNIQUE,
|
||||
bio VARCHAR DEFAULT '',
|
||||
banner_color VARCHAR DEFAULT '#6366f1',
|
||||
balance INTEGER DEFAULT 100,
|
||||
last_seen TIMESTAMP
|
||||
);
|
||||
|
||||
@@ -73,6 +74,13 @@ con.exec(`
|
||||
if (err) console.error("Error adding banner_color column:", err);
|
||||
});
|
||||
}
|
||||
|
||||
const hasBalance = rows.some(r => r.name === 'balance');
|
||||
if (!hasBalance) {
|
||||
con.run("ALTER TABLE users ADD COLUMN balance INTEGER DEFAULT 100", (err) => {
|
||||
if (err) console.error("Error adding balance column:", err);
|
||||
});
|
||||
}
|
||||
});
|
||||
console.log('Database initialized and cleared');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user