Column class's sql function return value shoud contains column.note
Closed this issue · 2 comments
Line 293 in e09b05a
sql function's return value shoud contains column.note
@property def sql(self): ''' Returns inline SQL of the column, which should be a part of table definition: "id" integer PRIMARY KEY AUTOINCREMENT ''' self.check_attributes_for_sql() components = [f'"{self.name}"', str(self.type)] if self.pk: components.append('PRIMARY KEY') if self.autoinc: components.append('AUTOINCREMENT') if self.unique: components.append('UNIQUE') if self.not_null: components.append('NOT NULL') if self.default is not None: components.append('DEFAULT ' + str(self.default)) if self.note is not None: # add this line components.append('Comment' + str(self.note)) return ' '.join(components)
Hi @me-drinks!
You mean insert notes as SQL comments? That's a nice idea
Done in 0.3.4