85 Commits

Author SHA1 Message Date
3692941ead Fixes #11464: Foreign key name is not provided by schema 2017-01-16 00:27:20 +03:00
a56c598743 Portability fixes for SchemaBuilder on MSSQL
Changed timestamp mapping to datetime on MSSQL.
Timestamp is a unique number on MSSQL, not a timestamp.

> https://msdn.microsoft.com/en-us/library/ms182776(v=SQL.90).aspx
> The timestamp data type is just an incrementing number and does not
> preserve a date or a time. To record a date or time, use a datetime data type.

separated from #9191
close #9305
2016-11-27 01:11:30 +01:00
7a3a342127 Fix errors reported by apidoc extension. (#12986) 2016-11-13 14:51:21 +01:00
4aa935e69e Fixes #12055: Changed boolean to bool and integer to int in phpdoc 2016-11-07 02:51:39 +03:00
e6eed9a7c9 yii\db\mssql\QueryBuilder - TYPE_TEXT mapped to NVARCHAR(MAX) 2016-10-04 16:42:05 +03:00
4d43ec3867 NTEXT is being deprecated in MSSQL 2016-10-04 10:23:04 +03:00
fb210b8839 Fixed typo in data type. Fixes #12599 2016-09-26 14:06:08 +03:00
3861108553 Fixed casting of binnary() type for MSSQL. Closes #12599 2016-09-26 13:41:27 +03:00
cac514e8e9 Fixes #12293: Fixed MSSQL Schema::resolveTableNames() when using linked database tables 2016-08-25 23:08:37 +03:00
c7d5e69cda Eliminated unused variables 2016-07-29 23:06:38 +03:00
edd6e719bb added missing since annotations and removed duplicate line 2016-04-28 03:02:17 +02:00
627233715b proper @since annotations 2016-04-28 02:25:32 +02:00
15432971d6 db/ColumnSchemaBuilder::buildCommentString() returns empty string by default 2016-04-20 09:26:07 +03:00
0fe27b9d3b Refactored code in PR #9441 2016-04-19 17:48:25 +03:00
c9dfc90be0 Merge branch 'methods_for_schema_builder' of https://github.com/vaseninm/yii2 into vaseninm-methods_for_schema_builder 2016-04-19 12:21:33 +03:00
73eb62a3cd DBMS specific workarounds for unsupported SQL92 form of SELECT EXISTS() (#11369) 2016-04-17 17:44:52 +03:00
2f91889b70 Removed unsignedPrimaryKey() schema builder type; now, the unsigned() modifier works with primary key types e.g. pk()->unsigned() or bigpk()->unsigned(). 2016-02-26 17:48:03 -08:00
51b99320bd Sqlite specific schema builder class actually gets loaded now 2016-02-20 06:53:31 -08:00
8c0b075bed Merge branch '9340-add-after-method-to-migrations-schema-builder' into 9562-add-char-datatype 2016-02-20 01:59:00 -08:00
eaeb926768 Adds char datatype to framework 2016-02-20 01:52:23 -08:00
0400eb9cee Resolved merge conflict in changelog 2016-02-18 02:34:02 -08:00
1af5980b35 Removed unused use statement, replaced preg_split with explode 2016-02-16 13:46:13 +03:00
e43c41c9ea db layer phpdoc fixes 2016-02-07 16:33:26 +01:00
bce61bd474 Add after() option to migrations schema builder 2015-12-28 06:34:46 -08:00
5cecb09c1b Fixes #9443: Added unsigned() to ColumnSchemaBuilder 2015-12-26 15:20:21 +03:00
a4acd048bc Add @throws tags to PHPDocs. 2015-12-24 11:11:03 +00:00
cd87d67f34 Global DOCS update: ~~~ replaced with ``` 2015-12-02 23:15:28 +02:00
1b3770fd21 Use === instead of == where possible 2015-10-10 01:04:35 +03:00
f83d233072 Fixed method call case to match definition 2015-10-10 00:26:44 +03:00
d801ca3c90 add mssql support (need test) 2015-08-19 16:42:44 +03:00
681db52ba6 refactored SchemaBuilder
- rename class to ColumnSchemaBuilder as this is more appropriate
- changed internal organisation to match how the rest of schema related classes work
  - the ColumnSchemaBuilder is now created the same way as QueryBuilder is
- removed static call magic and method annotations, now real methods are called as they are
- the whole code works on objects in a db context now instead of setting database connection in global state
- trait is now used by Migration by default but can be used in other contexts as well

Migration usage is now as follows:

```php
$this->createTable('example_table', [
  'id' => $this->primaryKey(),
  'name' => $this->string(64)->notNull(),
  'type' => $this->integer()->notNull()->defaultValue(10),
  'description' => $this->text(),
  'rule_name' => $this->string(64),
  'data' => $this->text(),
  'created_at' => $this->datetime()->notNull(),
  'updated_at' => $this->datetime(),
]);
```
2015-08-03 23:25:50 +02:00
a2568d1ec8 updated some comments and @since annotations 2015-08-02 19:56:49 +02:00
5af6105ea7 Fixes #9127, Fixes #9128: Fixed MSSQL QueryBuilder::renameColumn() and QueryBuilder::renameTable() escaping 2015-07-16 18:22:40 +03:00
3f7ffd6707 Improved SchemaBuilder docs, refactored code 2015-07-08 15:39:34 +03:00
b456f699cc Implemented SchemaBuilder 2015-07-08 15:38:21 +03:00
651ed4ee2c Undefined class NotSupportedException 2015-06-08 16:11:16 +03:00
2288f339e6 Parameter type is not compatible with declaration 2015-06-08 16:07:27 +03:00
ec920d2881 add missing schema name conditions for mssql
close #8046
fixes #6234
2015-05-10 00:31:43 +02:00
ef662b57be added missing @since annotations 2015-04-24 12:09:40 +02:00
4d1ca9ff17 Fixes #7831: Add order when fetching database table names and constraints 2015-03-30 22:18:56 +03:00
29304a185a Fixes #7833: Support (materialized) views and foreign tables along normal tables when fetching table schema 2015-03-30 19:01:12 +03:00
48255a446d Fixes #7867: Fixes findUniqueIndexes not to perform any processing on unique index on function for pgsql, Implemented findUniqueIndexes for oci and mssql 2015-03-30 18:01:30 +03:00
2aace3714c minor adjustments 2015-03-01 01:24:28 +01:00
5870a74672 Added Schema::DOUBLE to represent ANSI SQL Double Precision 2015-02-25 16:01:37 +03:00
1e5f159f78 override only mssql and sqlite QueryBuilder; throw an exception for composite in condition with a subquery 2015-01-31 22:20:41 -05:00
b9a6b65e89 Implicit type casting to avoid buggy dblib issues 2014-12-25 23:49:20 +03:00
44b5e8ef60 Fixes #4954: MSSQL column comments are not retrieved correctly 2014-09-10 13:44:04 -04:00
e15cfc0286 allow precision for binary type in MSSQL
fixes #4931
2014-09-05 15:14:59 +02:00
212c5ee3ef Fixes #4254: SqlDataProvider does not work with Oracle and SQL Server 2014-09-03 14:42:09 -04:00
7aed617c38 Fixes #4813: Fixed MSSQL schema that was getting incorrect info about constraints 2014-08-26 14:12:24 +04:00