This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # mengenerate migration file untuk membuat table kota | |
| php yii migrate/create create_kota_table --fields="provinsi_id:integer:notNull:foreignKey(provinsi),nama:string(50)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use yii\db\Migration; | |
| use League\Csv\Reader; | |
| /** | |
| * Handles the creation for table `kota`. | |
| * Has foreign keys to the tables: | |
| * | |
| * - `provinsi` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # menerapkan file yang ada folder migrations ke database | |
| php yii migrate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Perintah untuk membuat database migration untuk tabel kategori | |
| php yii migrate/create create_kategori_table --fields="nama:string(255)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use yii\db\Migration; | |
| use League\Csv\Reader; | |
| /** | |
| * Handles the creation for table `kategori`. | |
| */ | |
| class m160911_122311_create_kategori_table extends Migration | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Mengenerate file database migration untuk membuat tabel subkategori | |
| php yii migrate/create create_subkategori_table --fields="kategori_id:integer:notNull:foreignKey(kategori),nama:string(255)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use yii\db\Migration; | |
| use League\Csv\Reader; | |
| /** | |
| * Handles the creation for table `subkategori`. | |
| * Has foreign keys to the tables: | |
| * | |
| * - `kategori` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # perintah untuk menggenerate file migrasi untuk membuat tabel iklan | |
| php yii migrate/create create_iklan_table --fields="user_id:integer:notNull:foreignKey(user),judul:string(255):notNull,deskripsi:text:notNull,harga:decimal(30):notNull,foto:text:notNull,kota_id:integer:notNull:foreignKey(kota),subkategori_id:integer:notNull:foreignKey(subkategori),kontak_id:integer:notNull:foreignKey(kontak),dibuat_pada:integer(10),diperbarui_pada:integer(10)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Menampilkan bantuan atau petunjuk penggunakan gii console command | |
| php yii help gii | |
| # Menampilkan petunjuk penggunaan untuk command : gii/model | |
| # Kita dapat mengetahui parameter apa saja yang tersedia dan bisa kita set sesuai kebutuhan | |
| php yii help gii/model |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Generate file model untuk tabel kontak | |
| php yii gii/model --tableName=kontak --modelClass=Kontak | |
| # Generate file model untuk tabel provinsi | |
| php yii gii/model --tableName=provinsi --modelClass=Provinsi | |
| # Generate file model untuk tabel kota |