The transaction isolation level to use for this transaction. ![]() The metadata for all tables in the database. Unique constraints for all tables in the database.Ĭharacter used to quote schema, table, etc. Primary keys for all tables in the database. The row ID of the last row inserted, or the last value retrieved from the sequence object.Ĭheck constraints for all tables in the database.ĭefault value constraints for all tables in the database.įoreign keys for all tables in the database.Īll schema names in the database, except system schemas. ![]() Map of DB errors and corresponding exceptions If left part is found in DB error message exception class from the right part is used. The default schema name used for the current session. Application AssetBundle AssetConverter AssetConverterInterface AssetManager BadRequestHttpException CacheSession CompositeUrlRule ConflictHttpException Controller Cookie CookieCollection DbSession ErrorAction ErrorHandler ForbiddenHttpException GoneHttpException GroupUrlRule HeaderCollection HeadersAlreadySentException HtmlResponseFormatter HttpException IdentityInterface JqueryAsset JsExpression JsonParser JsonResponseFormatter Link Linkable MethodNotAllowedHttpException MultiFieldSession MultipartFormDataParser NotAcceptableHttpException NotFoundHttpException RangeNotSatisfiableHttpException Request RequestParserInterface Response ResponseFormatterInterface ServerErrorHttpException Session SessionIterator TooManyRequestsHttpException UnauthorizedHttpException UnprocessableEntityHttpException UnsupportedMediaTypeHttpException UploadedFile UrlManager UrlNormalizer UrlNormalizerRedirectException UrlRule UrlRuleInterface User UserEvent View ViewAction XmlResponseFormatter YiiAsset yii\widgets You can also chain withKeyName() to override default key name that is generated from table and column names (result is identical to specifying second parameter to function foreign()).ĭeferrable foreign constraint is supported on Postgres and Oracle and can be set by chaining. You can also chain onDelete() and/or onUpdate() to set the reference option (RESTRICT, CASCADE, SET NULL, NO ACTION) for the operation. Table.foreign(columns, )Īdds a foreign key constraint to a table for an existing column using table.foreign(column).references(column) or multiple columns using table.foreign(columns).references(columns).inTable(table).Ī default key name using the columns is used unless foreignKeyName is specified. If you want to chain unique() while creating new column you can use unique foreign # In PostgreSQL, SQLite and MSSQL a partial unique index can be specified by setting a 'where' predicate. In MSSQL and Postgres, you can set the useConstraint option to true to create a unique constraint instead of a unique index (defaults to false for MSSQL, true for Postgres without predicate, false for Postgres with predicate). Deferrable unique constraint are supported on Postgres and Oracle and can be set by passing deferrable option to options object. ![]() If you need to create a composite index, pass an array of column to columns. A default index name using the columns is used unless indexName is specified. In MySQL, the storage engine index type may be 'btree' or 'hash' index types, more info in Index Options section. Table.increments(name, options=)Īdds an unique index to a table over the given columns. Renames a column from one name to another. dropSchemaIfExists ( 'public', true ) Schema Building # dropColumn #ĭrops a column, specified by the column's name dropColumns #ĭrops multiple columns, taking a variable number of column names. dropSchemaIfExists ( 'public' ) //drop schema if exists 'public' cascade
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |