@@ -178,11 +178,18 @@ protected function createDatabase(): void
178178 $ command ->dropTable ('multiple_tree ' )->execute ();
179179 }
180180
181+ $ primaryKey = $ this ->driverName === 'oci '
182+ ? 'NUMBER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY '
183+ : $ this ->primaryKey ()->notNull ();
184+ $ name = $ this ->driverName === 'oci '
185+ ? $ this ->string ()->notNull ()
186+ : $ this ->text ()->notNull ();
187+
181188 $ command ->createTable (
182189 'tree ' ,
183190 [
184- 'id ' => $ this -> primaryKey ()-> notNull () ,
185- 'name ' => $ this -> text ()-> notNull () ,
191+ 'id ' => $ primaryKey ,
192+ 'name ' => $ name ,
186193 'lft ' => $ this ->integer ()->notNull (),
187194 'rgt ' => $ this ->integer ()->notNull (),
188195 'depth ' => $ this ->integer ()->notNull (),
@@ -192,9 +199,9 @@ protected function createDatabase(): void
192199 $ command ->createTable (
193200 'multiple_tree ' ,
194201 [
195- 'id ' => $ this -> primaryKey ()-> notNull () ,
202+ 'id ' => $ primaryKey ,
196203 'tree ' => $ this ->integer (),
197- 'name ' => $ this -> text ()-> notNull () ,
204+ 'name ' => $ name ,
198205 'lft ' => $ this ->integer ()->notNull (),
199206 'rgt ' => $ this ->integer ()->notNull (),
200207 'depth ' => $ this ->integer ()->notNull (),
0 commit comments