Metadata-Version: 2.4
Name: ngits-iot-db
Version: 0.2.2
Summary: SQLAlchemy models for IoT sensor data storage with Alembic migrations
Author-email: "NG IT Services Sp. z o. o." <biuro@ngits.pl>
License: BSD-3-Clause
Keywords: iot,sqlalchemy,database,models,sensors
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Database
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: SQLAlchemy>=2.0.0
Requires-Dist: alembic>=1.13.0
Requires-Dist: psycopg2-binary>=2.9.0
Provides-Extra: dev
Requires-Dist: black>=25.1.0; extra == "dev"
Requires-Dist: isort>=5.13.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Dynamic: license-file

database uri
============

You can set database uri by setting `IOT_DATABASE_URL` variable.

```shell
export IOT_DATABASE_URL=postgresql://postgres:postgres@localhost:5432/iot_local
```


make migrations
===============

```shell
alembic revision --autogenerate -m "Migration message."
```

upgrade
=======

```shell
# upgrade all
alembic upgrade head

# upgrade all to specific migration
alembic upgrade <revision_id>
```

downgrade
=========

```shell
# downgrade all
alembic downgrade base

# downgrade all to specific migration
alembic downgrade <revision_id>
```
