| @@ 39-50 (lines=12) @@ | ||
| 36 | Base = declarative_base() |
|
| 37 | ||
| 38 | ||
| 39 | class EgonStorages(Base): |
|
| 40 | __tablename__ = "egon_storages" |
|
| 41 | __table_args__ = {"schema": "supply"} |
|
| 42 | id = Column(BigInteger, Sequence("storage_seq"), primary_key=True) |
|
| 43 | sources = Column(JSONB) |
|
| 44 | source_id = Column(JSONB) |
|
| 45 | carrier = Column(String) |
|
| 46 | el_capacity = Column(Float) |
|
| 47 | bus_id = Column(Integer) |
|
| 48 | voltage_level = Column(Integer) |
|
| 49 | scenario = Column(String) |
|
| 50 | geom = Column(Geometry("POINT", 4326)) |
|
| 51 | ||
| 52 | ||
| 53 | class Storages(Dataset): |
|
| @@ 50-62 (lines=13) @@ | ||
| 47 | Base = declarative_base() |
|
| 48 | ||
| 49 | ||
| 50 | class EgonPowerPlants(Base): |
|
| 51 | __tablename__ = "egon_power_plants" |
|
| 52 | __table_args__ = {"schema": "supply"} |
|
| 53 | id = Column(BigInteger, Sequence("pp_seq"), primary_key=True) |
|
| 54 | sources = Column(JSONB) |
|
| 55 | source_id = Column(JSONB) |
|
| 56 | carrier = Column(String) |
|
| 57 | el_capacity = Column(Float) |
|
| 58 | bus_id = Column(Integer) |
|
| 59 | voltage_level = Column(Integer) |
|
| 60 | weather_cell_id = Column(Integer) |
|
| 61 | scenario = Column(String) |
|
| 62 | geom = Column(Geometry("POINT", 4326), index=True) |
|
| 63 | ||
| 64 | ||
| 65 | def create_tables(): |
|