﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
27446	Addition of `readonly` option to ModelField to allow database generated fields	Ben Cole	Ben Cole	"There exist multiple use cases where a database will generate values for a field/column. Most RDBMSes expect that these columns be excluded from from `INSERT` and `UPDATE` statements. However they still need to be included in `SELECT` statements.

Examples include the PostgreSQL `serial` data type, triggers and functions that generate defaults on `INSERT` (such as PostgreSQL `UUID`)

The proposal therefore is to add a `readonly` option to the base `Field` class that when `True` would strip these fields from being compiled to SQL during `INSERT`s and `UPDATE`s. This allows for a very simple change that covers all possible write queries that Django may perform (including bulk_*).

There exists a proof of concept https://github.com/novafloss/django-readonly-field"	New feature	assigned	Database layer (models, ORM)	dev	Normal			ewjoachim@…	Unreviewed	0	0	0	0	0	0
