Use a more optimal primary key and integer to store snowflakes

This commit is contained in:
Jeremy Zhang
2018-01-23 21:08:55 +00:00
parent ff42f4195b
commit aa199ad818
24 changed files with 246 additions and 84 deletions

View File

@ -4,7 +4,7 @@ class UserCSS(db.Model):
__tablename__ = "user_css"
id = db.Column(db.Integer, primary_key=True) # Auto increment id
name = db.Column(db.String(255), nullable=False) # CSS Name
user_id = db.Column(db.String(255), nullable=False) # Discord client ID of the owner of the css (can edit)
user_id = db.Column(db.BigInteger, nullable=False) # Discord client ID of the owner of the css (can edit)
css_var_bool = db.Column(db.Boolean(), nullable=False, server_default="0") # If css variables should be taken into consideration
css_variables = db.Column(db.Text()) # Customizeable CSS Variables
css = db.Column(db.Text().with_variant(db.Text(4294967295), 'mysql')) # CSS contents