File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
src/Bosnadev/Database/Schema Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -34,4 +34,14 @@ public function hstore($column) {
3434 public function uuid ($ column ) {
3535 return $ this ->addColumn ('uuid ' , $ column );
3636 }
37+
38+ /**
39+ * Create a new jsonb column on the table
40+ *
41+ * @param $column
42+ * @return \Illuminate\Support\Fluent
43+ */
44+ public function jsonb ($ column ) {
45+ return $ this ->addColumn ('jsonb ' , $ column );
46+ }
3747}
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ protected function typeCharacter(Fluent $column)
2121 }
2222
2323 /**
24+ * Create the column definition for a hstore type.
25+ *
2426 * @param Fluent $column
2527 * @return string
2628 */
@@ -29,13 +31,25 @@ protected function typeHstore(Fluent $column) {
2931 }
3032
3133 /**
34+ * Create the column definition for a uuid type.
35+ *
3236 * @param Fluent $column
3337 * @return string
3438 */
3539 protected function typeUuid (Fluent $ column ) {
3640 return "uuid " ;
3741 }
3842
43+ /**
44+ * Create the column definition for a jsonb type.
45+ *
46+ * @param Fluent $column
47+ * @return string
48+ */
49+ protected function typeJsonb (Fluent $ column ) {
50+ return "jsonb " ;
51+ }
52+
3953 /**
4054 * @param mixed $value
4155 * @return mixed|string
You can’t perform that action at this time.
0 commit comments