You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

14 lines
454 B

from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
class Song(db.Model):
id = db.Column(db.Integer, primary_key=True)
title = db.Column(db.String(100), nullable=False)
author = db.Column(db.String(100), nullable=False)
year = db.Column(db.Integer, nullable=False)
album = db.Column(db.String(100), nullable=False)
lyrics = db.Column(db.Text, nullable=False)
def __repr__(self):
return f'<Song {self.title}>'