0%

How to Run PostgreSQL Server and Database?

1. Online Tutorials

2. Issues

2.1 psycopg2.OperationalError: could not connect to server: Connection refused

Relevant resource:

Solution:

Just modify this file /etc/postgresql/12/main/pg_hba.conf:

  • local all postgres peer => local all postgres trust
  • local all all peer => local all all md5

2.2 Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432?

Relevant resource:

Solution:

  • find the folder containing the file postmaster.pid, and remove it:
    • rm /var/lib/postgresql/12/main/postmaster.pid
  • edit file /etc/postgresql/12/main/postgresql.conf, in which, set:
    • listen_addresses = '*'
    • port = 5432
    • unix_socket_directory = '/var/run/postgresql'

2.3 CREATE EXTENSION in PostgreSQL

Relevant resource:

Solutions:

  • Please make sure postgresql-contrib has been installed.

2.4 Deal With GinIndex

Relevant resource:

Solutions:

  • Please make sure btree_gin and pg_trgm EXTENSIONs have been CREATEed for the user username in PostgreSQL database. Namely, you need to \c database username before CREATE EXTENSION btree_gin and CREATE EXTENSION pg_trgm.

2.5 django.db.utils.ProgrammingError: syntax error at or near "FUNCTION"

Solutions:

  • Use PROCEDURE instead of FUNCTION.

2.6 django.db.migrations.exceptions.InconsistentMigrationHistory: Migration site.0001_initial is applied before its dependency account.0003_initial on database 'default'.

Relevant resource:

Solutions:

  • Please make sure \c database username is run from within psql.

2.7 LOG: SSL is not supported by this build

Relevant resource:

Solutions:

1
2
⋊> ~ sudo su - postgres
postgres=# postgres -D /usr/local/pgsql/data

3. Process

Step 1. Install postgresql and postgresql-contrib

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
⋊> ~ apt list --installed | grep postgresql                                                                                                                                                                                                                                  22:46:41

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

postgresql-12/focal-updates,focal-security,now 12.11-0ubuntu0.20.04.1 amd64 [installed,automatic]
postgresql-all/focal-updates,focal-security,now 12+214ubuntu0.1 all [installed]
postgresql-client-12/focal-updates,focal-security,now 12.11-0ubuntu0.20.04.1 amd64 [installed,automatic]
postgresql-client-common/focal-updates,focal-security,now 214ubuntu0.1 all [installed,automatic]
postgresql-common/focal-updates,focal-security,now 214ubuntu0.1 all [installed,automatic]
postgresql-contrib/focal-updates,focal-security,now 12+214ubuntu0.1 all [installed]
postgresql-plperl-12/focal-updates,focal-security,now 12.11-0ubuntu0.20.04.1 amd64 [installed,automatic]
postgresql-plpython3-12/focal-updates,focal-security,now 12.11-0ubuntu0.20.04.1 amd64 [installed,automatic]
postgresql-pltcl-12/focal-updates,focal-security,now 12.11-0ubuntu0.20.04.1 amd64 [installed,automatic]
postgresql-server-dev-12/focal-updates,focal-security,now 12.11-0ubuntu0.20.04.1 amd64 [installed,automatic]
postgresql-server-dev-all/focal-updates,focal-security,now 214ubuntu0.1 all [installed,automatic]
postgresql/focal-updates,focal-security,now 12+214ubuntu0.1 all [installed]

Step 2. Open a FIRST terminal:

1
2
3
4
5
6
7
8
9
10
⋊> ~ sudo su - postgres                                                                                                                                                                                                                                                      22:03:23
postgres@localhost:/var/lib/postgresql$ pwd
/var/lib/postgresql
postgres@localhost:/var/lib/postgresql$ postgres -D /etc/postgresql/12/main
2022-06-03 22:04:41.766 PDT [284525] LOG: starting PostgreSQL 12.11 (Ubuntu 12.11-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit
2022-06-03 22:04:41.766 PDT [284525] LOG: listening on IPv4 address "0.0.0.0", port 5432
2022-06-03 22:04:41.767 PDT [284525] LOG: listening on IPv6 address "::", port 5432
2022-06-03 22:04:41.769 PDT [284525] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-06-03 22:04:41.787 PDT [284529] LOG: database system was shut down at 2022-06-03 22:04:01 PDT
2022-06-03 22:04:41.795 PDT [284525] LOG: database system is ready to accept connections

Step 3. Open a SECOND terminal:

  • with user postgres, psql will do
  • with other users, such as longervision, you've got to do psql -U postgres
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
⋊> ~ psql -U postgres                                                                                                                                                                                                                                                        22:06:18
psql (12.11 (Ubuntu 12.11-0ubuntu0.20.04.1))
Type "help" for help.

postgres=# \c
You are now connected to database "postgres" as user "postgres".
postgres=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
--------------+----------+----------+-------------+-------------+---------------------------
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
(3 rows)

postgres=# \du
List of roles
Role name | Attributes | Member of
--------------+------------------------------------------------------------+-----------
postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}

postgres=# \dx
List of installed extensions
Name | Version | Schema | Description
---------+---------+------------+------------------------------
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
(1 row)

postgres=# CREATE ROLE username WITH LOGIN PASSWORD 'password';
CREATE ROLE
postgres=# CREATE DATABASE database;
CREATE DATABASE
postgres=# ALTER USER username WITH SUPERUSER;
ALTER ROLE
postgres=# GRANT ALL PRIVILEGES ON DATABASE database TO username;
GRANT
postgres=# ALTER USER username CREATEDB;
ALTER ROLE
postgres=# \c database username
Password for user username:
You are now connected to database "database" as user "username".
database=# \dx
List of installed extensions
Name | Version | Schema | Description
---------+---------+------------+------------------------------
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
(1 row)
database=# CREATE EXTENSION btree_gin;
CREATE EXTENSION
database=# CREATE EXTENSION "uuid-ossp";
CREATE EXTENSION
database=# CREATE EXTENSION "ltree";
CREATE EXTENSION
database=# CREATE EXTENSION "pg_trgm";
CREATE EXTENSION
database=# CREATE EXTENSION "hstore";
CREATE EXTENSION
database=# \dx
List of installed extensions
Name | Version | Schema | Description
-----------+---------+------------+-------------------------------------------------------------------
btree_gin | 1.3 | public | support for indexing common datatypes in GIN
hstore | 1.6 | public | data type for storing sets of (key, value) pairs
ltree | 1.1 | public | data type for hierarchical tree-like structures
pg_trgm | 1.4 | public | text similarity measurement and index searching based on trigrams
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
uuid-ossp | 1.1 | public | generate universally unique identifiers (UUIDs)
(6 rows)
database=# \conninfo
You are connected to database "database" as user "username" via socket in "/var/run/postgresql" at port "5432".

Step 4. Saleor Reset Migrations (Optional)

Refer to How to Reset Migrations

Run the following 2 lines:

  • find . -path "*/migrations/*.py" -not -name "__init__.py" -delete
  • find . -path "*/migrations/*.pyc" -delete

Modify saleor/settings.py

From

1
2
3
DATABASE_CONNECTION_DEFAULT_NAME: dj_database_url.config(
default="postgres://saleor:saleor@localhost:5432/saleor", conn_max_age=600
),
to
1
2
3
DATABASE_CONNECTION_DEFAULT_NAME: dj_database_url.config(
default="postgres://username:password@localhost:5432/database", conn_max_age=600
),
correspondingly.

Start Migration

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
⋊> /v/w/v/saleor on main ⨯ python manage.py makemigrations                                                                                                                                                                                                                   22:32:00
WARNING saleor.core.jwt_manager RSA_PRIVATE_KEY is missing. Using temporary key for local development with DEBUG mode. [PID:296644:MainThread]
Migrations for 'channel':
saleor/channel/migrations/0001_initial.py
- Create model Channel
Migrations for 'page':
saleor/page/migrations/0001_initial.py
- Create model Page
- Create model PageTranslation
- Create model PageType
- Create index pagetype_p_meta_idx on field(s) private_metadata of model pagetype
- Create index pagetype_meta_idx on field(s) metadata of model pagetype
- Create index page_pagety_name_7c1cb8_gin on field(s) name, slug of model pagetype
- Add field page to pagetranslation
- Add field page_type to page
- Alter unique_together for pagetranslation (1 constraint(s))
- Create index page_p_meta_idx on field(s) private_metadata of model page
- Create index page_meta_idx on field(s) metadata of model page
- Create index page_page_title_964714_gin on field(s) title, slug of model page
Migrations for 'plugins':
saleor/plugins/migrations/0001_initial.py
- Create model PluginConfiguration
- Create model EmailTemplate
Migrations for 'account':
saleor/account/migrations/0001_initial.py
- Create model User
- Create model Address
- Create model CustomerEvent
- Create model StaffNotificationRecipient
- Create model CustomerNote
saleor/account/migrations/0002_customerevent_app.py
- Add field app to customerevent
saleor/account/migrations/0003_initial.py
- Add field order to customerevent
- Add field user to customerevent
- Create index address_search_gin on field(s) first_name, last_name, city, country of model address
- Create index warehouse_address_search_gin on field(s) company_name, street_address_1, street_address_2, city, postal_code, phone of model address
- Add field addresses to user
- Add field default_billing_address to user
- Add field default_shipping_address to user
- Add field groups to user
- Add field user_permissions to user
- Create index user_p_meta_idx on field(s) private_metadata of model user
- Create index user_meta_idx on field(s) metadata of model user
- Create index order_user_search_gin on field(s) email, first_name, last_name of model user
- Create index user_search_gin on field(s) search_document of model user
Migrations for 'app':
saleor/app/migrations/0001_initial.py
- Create model App
- Create model AppToken
- Create model AppInstallation
- Create model AppExtension
- Create index app_p_meta_idx on field(s) private_metadata of model app
- Create index app_meta_idx on field(s) metadata of model app
Migrations for 'csv':
saleor/csv/migrations/0001_initial.py
- Create model ExportFile
- Create model ExportEvent
Migrations for 'webhook':
saleor/webhook/migrations/0001_initial.py
- Create model Webhook
- Create model WebhookEvent
Migrations for 'core':
saleor/core/migrations/0001_initial.py
- Create model EventDelivery
- Create model EventPayload
- Create model EventDeliveryAttempt
- Add field payload to eventdelivery
- Add field webhook to eventdelivery
Migrations for 'attribute':
saleor/attribute/migrations/0001_initial.py
- Create model AssignedPageAttribute
- Create model AssignedPageAttributeValue
- Create model AssignedProductAttribute
- Create model AssignedProductAttributeValue
- Create model AssignedVariantAttribute
- Create model AssignedVariantAttributeValue
- Create model Attribute
- Create model AttributePage
- Create model AttributeProduct
- Create model AttributeTranslation
- Create model AttributeValue
- Create model AttributeValueTranslation
- Create model AttributeVariant
saleor/attribute/migrations/0002_initial.py
- Add field assigned_variants to attributevariant
- Add field attribute to attributevariant
- Add field product_type to attributevariant
- Add field attribute_value to attributevaluetranslation
- Add field attribute to attributevalue
- Add field reference_page to attributevalue
- Add field reference_product to attributevalue
- Add field attribute to attributetranslation
- Add field assigned_products to attributeproduct
- Add field attribute to attributeproduct
- Add field product_type to attributeproduct
- Add field assigned_pages to attributepage
- Add field attribute to attributepage
- Add field page_type to attributepage
- Add field page_types to attribute
- Add field product_types to attribute
- Add field product_variant_types to attribute
- Add field assignment to assignedvariantattributevalue
- Add field value to assignedvariantattributevalue
- Add field assignment to assignedvariantattribute
- Add field values to assignedvariantattribute
- Add field variant to assignedvariantattribute
- Add field assignment to assignedproductattributevalue
- Add field value to assignedproductattributevalue
- Add field assignment to assignedproductattribute
- Add field product to assignedproductattribute
- Add field values to assignedproductattribute
- Add field assignment to assignedpageattributevalue
- Add field value to assignedpageattributevalue
- Add field assignment to assignedpageattribute
- Add field page to assignedpageattribute
- Add field values to assignedpageattribute
- Alter unique_together for attributevariant (1 constraint(s))
- Alter unique_together for attributevaluetranslation (1 constraint(s))
- Create index attribute_search_gin on field(s) name, slug of model attributevalue
- Alter unique_together for attributevalue (1 constraint(s))
- Alter unique_together for attributetranslation (1 constraint(s))
- Alter unique_together for attributeproduct (1 constraint(s))
- Alter unique_together for attributepage (1 constraint(s))
- Create index attribute_p_meta_idx on field(s) private_metadata of model attribute
- Create index attribute_meta_idx on field(s) metadata of model attribute
- Alter unique_together for assignedvariantattributevalue (1 constraint(s))
- Alter unique_together for assignedvariantattribute (1 constraint(s))
- Alter unique_together for assignedproductattributevalue (1 constraint(s))
- Alter unique_together for assignedproductattribute (1 constraint(s))
- Alter unique_together for assignedpageattributevalue (1 constraint(s))
- Alter unique_together for assignedpageattribute (1 constraint(s))
Migrations for 'checkout':
saleor/checkout/migrations/0001_initial.py
- Create model Checkout
- Create model CheckoutLine
saleor/checkout/migrations/0002_initial.py
- Add field variant to checkoutline
- Add field billing_address to checkout
- Add field channel to checkout
- Add field collection_point to checkout
- Add field gift_cards to checkout
- Add field shipping_address to checkout
- Add field shipping_method to checkout
- Add field user to checkout
- Create index checkout_p_meta_idx on field(s) private_metadata of model checkout
- Create index checkout_meta_idx on field(s) metadata of model checkout
Migrations for 'discount':
saleor/discount/migrations/0001_initial.py
- Create model OrderDiscount
- Create model Sale
- Create model SaleChannelListing
- Create model SaleTranslation
- Create model Voucher
- Create model VoucherTranslation
- Create model VoucherCustomer
- Create model VoucherChannelListing
saleor/discount/migrations/0002_initial.py
- Add field categories to voucher
- Add field collections to voucher
- Add field products to voucher
- Add field variants to voucher
- Add field sale to saletranslation
- Add field channel to salechannellisting
- Add field sale to salechannellisting
- Add field categories to sale
- Add field collections to sale
- Add field products to sale
- Add field variants to sale
- Add field order to orderdiscount
- Alter unique_together for vouchertranslation (1 constraint(s))
- Alter unique_together for vouchercustomer (1 constraint(s))
- Alter unique_together for voucherchannellisting (1 constraint(s))
- Alter unique_together for saletranslation (1 constraint(s))
- Alter unique_together for salechannellisting (1 constraint(s))
- Create index discount_or_name_d16858_gin on field(s) name, translated_name of model orderdiscount
Migrations for 'giftcard':
saleor/giftcard/migrations/0001_initial.py
- Create model GiftCard
- Create model GiftCardEvent
- Create model GiftCardTag
- Create index gift_card_tag_search_gin on field(s) name of model giftcardtag
- Add field app to giftcardevent
- Add field gift_card to giftcardevent
saleor/giftcard/migrations/0002_initial.py
- Add field order to giftcardevent
- Add field user to giftcardevent
- Add field app to giftcard
- Add field created_by to giftcard
- Add field fulfillment_line to giftcard
- Add field product to giftcard
- Add field tags to giftcard
- Add field used_by to giftcard
Migrations for 'invoice':
saleor/invoice/migrations/0001_initial.py
- Create model Invoice
- Create model InvoiceEvent
saleor/invoice/migrations/0002_initial.py
- Add field order to invoiceevent
- Add field user to invoiceevent
- Add field order to invoice
- Create index invoice_p_meta_idx on field(s) private_metadata of model invoice
- Create index invoice_meta_idx on field(s) metadata of model invoice
Migrations for 'menu':
saleor/menu/migrations/0001_initial.py
- Create model Menu
- Create model MenuItem
- Create model MenuItemTranslation
saleor/menu/migrations/0002_initial.py
- Add field category to menuitem
- Add field collection to menuitem
- Add field menu to menuitem
- Add field page to menuitem
- Add field parent to menuitem
- Create index menu_p_meta_idx on field(s) private_metadata of model menu
- Create index menu_meta_idx on field(s) metadata of model menu
- Alter unique_together for menuitemtranslation (1 constraint(s))
- Create index menuitem_p_meta_idx on field(s) private_metadata of model menuitem
- Create index menuitem_meta_idx on field(s) metadata of model menuitem
Migrations for 'order':
saleor/order/migrations/0001_initial.py
- Create model Fulfillment
- Create model FulfillmentLine
- Create model Order
- Create model OrderEvent
- Create model OrderLine
saleor/order/migrations/0002_initial.py
- Add field variant to orderline
- Add field app to orderevent
- Add field order to orderevent
- Add field user to orderevent
- Add field billing_address to order
- Add field channel to order
- Add field collection_point to order
- Add field gift_cards to order
- Add field original to order
- Add field shipping_address to order
- Add field shipping_method to order
- Add field user to order
- Add field voucher to order
- Add field fulfillment to fulfillmentline
- Add field order_line to fulfillmentline
- Add field stock to fulfillmentline
- Add field order to fulfillment
- Create index order_p_meta_idx on field(s) private_metadata of model order
- Create index order_meta_idx on field(s) metadata of model order
- Create index order_search_gin on field(s) search_document of model order
- Create index order_email_search_gin on field(s) user_email of model order
- Create index fulfillment_p_meta_idx on field(s) private_metadata of model fulfillment
- Create index fulfillment_meta_idx on field(s) metadata of model fulfillment
Migrations for 'payment':
saleor/payment/migrations/0001_initial.py
- Create model Payment
- Create model TransactionItem
- Create model TransactionEvent
- Create model Transaction
- Create index transactionitem_p_meta_idx on field(s) private_metadata of model transactionitem
- Create index transactionitem_meta_idx on field(s) metadata of model transactionitem
- Create index payment_tra_order_i_e783c4_gin on field(s) order_id, status of model transactionitem
- Create index payment_p_meta_idx on field(s) private_metadata of model payment
- Create index payment_meta_idx on field(s) metadata of model payment
- Create index payment_pay_order_i_f22aa2_gin on field(s) order_id, is_active, charge_status of model payment
Migrations for 'product':
saleor/product/migrations/0001_initial.py
- Create model Category
- Create model CategoryTranslation
- Create model Collection
- Create model CollectionChannelListing
- Create model CollectionProduct
- Create model CollectionTranslation
- Create model DigitalContent
- Create model DigitalContentUrl
- Create model Product
- Create model ProductChannelListing
- Create model ProductMedia
- Create model ProductTranslation
- Create model ProductType
- Create model ProductVariant
- Create model VariantMedia
- Create model ProductVariantTranslation
- Create model ProductVariantChannelListing
- Add field media to productvariant
- Add field product to productvariant
- Create index producttype_p_meta_idx on field(s) private_metadata of model producttype
- Create index producttype_meta_idx on field(s) metadata of model producttype
- Create index product_type_search_gin on field(s) name, slug of model producttype
- Add field product to producttranslation
- Add field product to productmedia
- Add field channel to productchannellisting
- Add field product to productchannellisting
- Add field category to product
- Add field default_variant to product
- Add field product_type to product
- Add field content to digitalcontenturl
- Add field line to digitalcontenturl
- Add field product_variant to digitalcontent
- Add field collection to collectiontranslation
- Add field collection to collectionproduct
- Add field product to collectionproduct
- Add field channel to collectionchannellisting
- Add field collection to collectionchannellisting
- Add field products to collection
- Add field category to categorytranslation
- Add field parent to category
- Alter unique_together for variantmedia (1 constraint(s))
- Alter unique_together for productvarianttranslation (1 constraint(s))
- Alter unique_together for productvariantchannellisting (1 constraint(s))
- Create index productvariant_p_meta_idx on field(s) private_metadata of model productvariant
- Create index productvariant_meta_idx on field(s) metadata of model productvariant
- Alter unique_together for producttranslation (1 constraint(s))
- Create index product_pro_publish_a3c049_idx on field(s) published_at of model productchannellisting
- Create index product_pro_discoun_3145f3_btree on field(s) discounted_price_amount of model productchannellisting
- Alter unique_together for productchannellisting (1 constraint(s))
- Create index product_search_gin on field(s) search_document of model product
- Create index product_tsearch on field(s) search_vector of model product
- Create index product_p_meta_idx on field(s) private_metadata of model product
- Create index product_meta_idx on field(s) metadata of model product
- Create index digitalcontent_p_meta_idx on field(s) private_metadata of model digitalcontent
- Create index digitalcontent_meta_idx on field(s) metadata of model digitalcontent
- Alter unique_together for collectiontranslation (1 constraint(s))
- Alter unique_together for collectionproduct (1 constraint(s))
- Alter unique_together for collectionchannellisting (1 constraint(s))
- Create index collection_p_meta_idx on field(s) private_metadata of model collection
- Create index collection_meta_idx on field(s) metadata of model collection
- Create index collection_search_gin on field(s) name, slug of model collection
- Alter unique_together for categorytranslation (1 constraint(s))
- Create index category_p_meta_idx on field(s) private_metadata of model category
- Create index category_meta_idx on field(s) metadata of model category
- Create index category_search_name_slug_gin on field(s) name, slug, description_plaintext of model category
Migrations for 'shipping':
saleor/shipping/migrations/0001_initial.py
- Create model ShippingMethod
- Create model ShippingZone
- Create model ShippingMethodTranslation
- Create model ShippingMethodPostalCodeRule
- Create model ShippingMethodChannelListing
- Add field shipping_zone to shippingmethod
- Create index shippingzone_p_meta_idx on field(s) private_metadata of model shippingzone
- Create index shippingzone_meta_idx on field(s) metadata of model shippingzone
- Alter unique_together for shippingmethodtranslation (1 constraint(s))
- Alter unique_together for shippingmethodpostalcoderule (1 constraint(s))
- Alter unique_together for shippingmethodchannellisting (1 constraint(s))
- Create index shippingmethod_p_meta_idx on field(s) private_metadata of model shippingmethod
- Create index shippingmethod_meta_idx on field(s) metadata of model shippingmethod
Migrations for 'warehouse':
saleor/warehouse/migrations/0001_initial.py
- Create model Warehouse
- Create model Stock
- Create model Reservation
- Create model PreorderReservation
- Create model PreorderAllocation
- Create model Allocation
- Create index warehouse_p_meta_idx on field(s) private_metadata of model warehouse
- Create index warehouse_meta_idx on field(s) metadata of model warehouse
- Alter unique_together for stock (1 constraint(s))
- Create index warehouse_r_checkou_b66369_idx on field(s) checkout_line, reserved_until of model reservation
- Alter unique_together for reservation (1 constraint(s))
- Create index warehouse_p_checkou_3abf41_idx on field(s) checkout_line, reserved_until of model preorderreservation
- Alter unique_together for preorderreservation (1 constraint(s))
- Alter unique_together for preorderallocation (1 constraint(s))
- Alter unique_together for allocation (1 constraint(s))
Migrations for 'site':
saleor/site/migrations/0001_initial.py
- Create model SiteSettings
- Create model SiteSettingsTranslation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
⋊> /v/w/v/saleor on main ⨯ python manage.py migrate                                                                                                                                                                                                                          00:02:56
WARNING saleor.core.jwt_manager RSA_PRIVATE_KEY is missing. Using temporary key for local development with DEBUG mode. [PID:462981:MainThread]
Operations to perform:
Apply all migrations: account, app, attribute, auth, channel, checkout, contenttypes, core, csv, discount, django_celery_beat, django_prices_openexchangerates, django_prices_vatlayer, giftcard, invoice, menu, order, page, payment, plugins, product, shipping, site, sites, warehouse, webhook
Running migrations:
Applying order.0001_initial... OK
Applying channel.0001_initial... OK
Applying product.0001_initial... OK
Applying shipping.0001_initial... OK
Applying checkout.0001_initial... OK
Applying contenttypes.0001_initial... OK
Applying contenttypes.0002_remove_content_type_name... OK
Applying auth.0001_initial... OK
Applying auth.0002_alter_permission_name_max_length... OK
Applying auth.0003_alter_user_email_max_length... OK
Applying auth.0004_alter_user_username_opts... OK
Applying auth.0005_alter_user_last_login_null... OK
Applying auth.0006_require_contenttypes_0002... OK
Applying auth.0007_alter_validators_add_error_messages... OK
Applying auth.0008_alter_user_username_max_length... OK
Applying auth.0009_alter_user_last_name_max_length... OK
Applying auth.0010_alter_group_name_max_length... OK
Applying auth.0011_update_proxy_permissions... OK
Applying auth.0012_alter_user_first_name_max_length... OK
Applying app.0001_initial... OK
Applying account.0001_initial... OK
Applying account.0002_customerevent_app... OK
Applying warehouse.0001_initial... OK
Applying giftcard.0001_initial... OK
Applying giftcard.0002_initial... OK
Applying discount.0001_initial... OK
Applying discount.0002_initial... OK
Applying order.0002_initial... OK
Applying account.0003_initial... OK
Applying page.0001_initial... OK
Applying attribute.0001_initial... OK
Applying attribute.0002_initial... OK
Applying checkout.0002_initial... OK
Applying webhook.0001_initial... OK
Applying core.0001_initial... OK
Applying csv.0001_initial... OK
Applying django_celery_beat.0001_initial... OK
Applying django_celery_beat.0002_auto_20161118_0346... OK
Applying django_celery_beat.0003_auto_20161209_0049... OK
Applying django_celery_beat.0004_auto_20170221_0000... OK
Applying django_celery_beat.0005_add_solarschedule_events_choices... OK
Applying django_celery_beat.0006_auto_20180322_0932... OK
Applying django_celery_beat.0007_auto_20180521_0826... OK
Applying django_celery_beat.0008_auto_20180914_1922... OK
Applying django_celery_beat.0006_auto_20180210_1226... OK
Applying django_celery_beat.0006_periodictask_priority... OK
Applying django_celery_beat.0009_periodictask_headers... OK
Applying django_celery_beat.0010_auto_20190429_0326... OK
Applying django_celery_beat.0011_auto_20190508_0153... OK
Applying django_celery_beat.0012_periodictask_expire_seconds... OK
Applying django_celery_beat.0013_auto_20200609_0727... OK
Applying django_celery_beat.0014_remove_clockedschedule_enabled... OK
Applying django_celery_beat.0015_edit_solarschedule_events_choices... OK
Applying django_prices_openexchangerates.0001_initial... OK
Applying django_prices_openexchangerates.0002_auto_20160329_0702... OK
Applying django_prices_openexchangerates.0003_auto_20161018_0707... OK
Applying django_prices_openexchangerates.0004_auto_20170316_0944... OK
Applying django_prices_openexchangerates.0005_auto_20190124_1008... OK
Applying django_prices_vatlayer.0001_initial... OK
Applying django_prices_vatlayer.0002_ratetypes... OK
Applying django_prices_vatlayer.0003_auto_20180316_1053... OK
Applying invoice.0001_initial... OK
Applying invoice.0002_initial... OK
Applying menu.0001_initial... OK
Applying menu.0002_initial... OK
Applying payment.0001_initial... OK
Applying plugins.0001_initial... OK
Applying sites.0001_initial... OK
Applying sites.0002_alter_domain_unique... OK
Applying site.0001_initial... OK