peewee Documentation Release 0.9.7
Entry(CustomModel): # etc, etc Using with Postgresql Point models at an instance of PostgresqlDatabase. psql_db = peewee.PostgresqlDatabase('my_database', user='code') class PostgresqlModel(peewee.Model): Model): """A base model that will use our MySQL database""" class Meta: database = psql_db class Blog(PostgresqlModel): creator = peewee.CharField() # etc, etc Using with MySQL Point models0 码力 | 78 页 | 143.68 KB | 1 年前3peewee Documentation Release 1.0.0
database named “peewee.db”. Using with Postgresql Point models at an instance of PostgresqlDatabase. psql_db = peewee.PostgresqlDatabase('my_database', user='code') class PostgresqlModel(peewee.Model): Model): """A base model that will use our Postgresql database""" class Meta: database = psql_db class Blog(PostgresqlModel): creator = peewee.CharField() # etc, etc Using with MySQL0 码力 | 101 页 | 163.20 KB | 1 年前3peewee Documentation Release 3.0.0
you can load the data into a PostgreSQL database using the following commands: createdb peewee_test psql -U postgres -f clubdata.sql -d peewee_test -x -q To create the schema using Peewee, without loading connect]. psql_db = PostgresqlDatabase('my_database', user='postgres') class BaseModel(Model): """A base model that will use our Postgresql database""" class Meta: database = psql_db class from the playhouse.postgres_ext module: from playhouse.postgres_ext import PostgresqlExtDatabase psql_db = PostgresqlExtDatabase('my_database', user='postgres') Using SQLite To connect to a SQLite database0 码力 | 319 页 | 361.50 KB | 1 年前3peewee Documentation Release 3.5.0
connect]. psql_db = PostgresqlDatabase('my_database', user='postgres') class BaseModel(Model): """A base model that will use our Postgresql database""" class Meta: database = psql_db class from the playhouse.postgres_ext module: from playhouse.postgres_ext import PostgresqlExtDatabase psql_db = PostgresqlExtDatabase('my_database', user='postgres') Using SQLite To connect to a SQLite database you can load the data into a PostgreSQL database using the following commands: createdb peewee_test psql -U postgres -f clubdata.sql -d peewee_test -x -q To create the schema using Peewee, without loading0 码力 | 347 页 | 380.80 KB | 1 年前3peewee Documentation Release 3.4.0
you can load the data into a PostgreSQL database using the following commands: createdb peewee_test psql -U postgres -f clubdata.sql -d peewee_test -x -q To create the schema using Peewee, without loading connect]. psql_db = PostgresqlDatabase('my_database', user='postgres') class BaseModel(Model): """A base model that will use our Postgresql database""" class Meta: database = psql_db class from the playhouse.postgres_ext module: from playhouse.postgres_ext import PostgresqlExtDatabase psql_db = PostgresqlExtDatabase('my_database', user='postgres') Using SQLite To connect to a SQLite database0 码力 | 349 页 | 382.34 KB | 1 年前3peewee Documentation Release 3.1.0
you can load the data into a PostgreSQL database using the following commands: createdb peewee_test psql -U postgres -f clubdata.sql -d peewee_test -x -q To create the schema using Peewee, without loading connect]. psql_db = PostgresqlDatabase('my_database', user='postgres') class BaseModel(Model): """A base model that will use our Postgresql database""" class Meta: database = psql_db class from the playhouse.postgres_ext module: from playhouse.postgres_ext import PostgresqlExtDatabase psql_db = PostgresqlExtDatabase('my_database', user='postgres') Using SQLite To connect to a SQLite database0 码力 | 332 页 | 370.77 KB | 1 年前3peewee Documentation Release 3.6.0
connect]. psql_db = PostgresqlDatabase('my_database', user='postgres') class BaseModel(Model): """A base model that will use our Postgresql database""" class Meta: database = psql_db class from the playhouse.postgres_ext module: from playhouse.postgres_ext import PostgresqlExtDatabase psql_db = PostgresqlExtDatabase('my_database', user='postgres') Using SQLite To connect to a SQLite database you can load the data into a PostgreSQL database using the following commands: createdb peewee_test psql -U postgres -f clubdata.sql -d peewee_test -x -q To create the schema using Peewee, without loading0 码力 | 377 页 | 399.12 KB | 1 年前3The Weblate Manual 4.16.2
separate user account: # If PostgreSQL was not installed before, set the main password sudo -u postgres psql postgres -c "\password postgres" # Create a database user called "weblate" sudo -u postgres createuser database 7. Restore the database from the backup: cat backup.sql | docker-compose exec -T database psql --username weblate --dbname postgres 8. (Optional) Update password for the Weblate user. This might PostgreSQL 14 or 15 as way of storing passwords has been changed: docker-compose exec -T database psql --username weblate --dbname postgres -c "ALTER USER weblate WITH PASSWORD 'weblate'" 9. Start all0 码力 | 807 页 | 11.23 MB | 1 年前3The Weblate Manual 4.16
separate user account: # If PostgreSQL was not installed before, set the main password sudo -u postgres psql postgres -c "\password postgres" # Create a database user called "weblate" sudo -u postgres createuser database 7. Restore the database from the backup: cat backup.sql | docker-compose exec -T database psql --username weblate --dbname postgres 8. (Optional) Update password for the Weblate user. This might PostgreSQL 14 or 15 as way of storing passwords has been changed: docker-compose exec -T database psql --username weblate --dbname postgres -c "ALTER USER weblate WITH PASSWORD 'weblate'" 9. Start all0 码力 | 807 页 | 11.23 MB | 1 年前3The Weblate Manual 4.16.3
separate user account: # If PostgreSQL was not installed before, set the main password sudo -u postgres psql postgres -c "\password postgres" # Create a database user called "weblate" sudo -u postgres createuser database 7. Restore the database from the backup: cat backup.sql | docker-compose exec -T database psql --username weblate --dbname postgres 8. (Optional) Update password for the Weblate user. This might PostgreSQL 14 or 15 as way of storing passwords has been changed: docker-compose exec -T database psql --username weblate --dbname postgres -c "ALTER USER weblate WITH PASSWORD 'weblate'" 9. Start all0 码力 | 809 页 | 11.23 MB | 1 年前3
共 173 条
- 1
- 2
- 3
- 4
- 5
- 6
- 18