mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Remove useless primary key from line table
This commit is contained in:
parent
0e5ef007f1
commit
15d8a8eb84
2 changed files with 4 additions and 5 deletions
|
@ -78,10 +78,10 @@ class DBLine(Base):
|
||||||
"""Table of item's lines."""
|
"""Table of item's lines."""
|
||||||
__tablename__ = "line"
|
__tablename__ = "line"
|
||||||
|
|
||||||
key = Column(String, primary_key=True)
|
key = Column(String)
|
||||||
value = Column(String)
|
value = Column(String)
|
||||||
item_name = Column(String, ForeignKey("item.name"), primary_key=True)
|
item_name = Column(String, ForeignKey("item.name"))
|
||||||
timestamp = Column(DateTime, default=datetime.now)
|
timestamp = Column(DateTime, default=datetime.now, primary_key=True)
|
||||||
|
|
||||||
item = relationship(
|
item = relationship(
|
||||||
"DBItem", backref="lines", order_by=timestamp)
|
"DBItem", backref="lines", order_by=timestamp)
|
||||||
|
|
|
@ -19,8 +19,7 @@ create table line (
|
||||||
key varchar not null,
|
key varchar not null,
|
||||||
value varchar not null,
|
value varchar not null,
|
||||||
item_name varchar references item (name) not null,
|
item_name varchar references item (name) not null,
|
||||||
timestamp timestamp not null,
|
timestamp timestamp not null);
|
||||||
primary key (key, value, item_name, timestamp));
|
|
||||||
|
|
||||||
create table property (
|
create table property (
|
||||||
key varchar not null,
|
key varchar not null,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue