-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
595 additions
and
7 deletions.
There are no files selected for viewing
420 changes: 420 additions & 0 deletions
420
app/schemas/org.xtimms.ridebus.data.database.RideBusDatabase/2.json
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
This file contains 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
This file contains 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
74 changes: 74 additions & 0 deletions
74
app/src/main/java/org/xtimms/ridebus/data/database/migrations/Migration1To2.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
package org.xtimms.ridebus.data.database.migrations | ||
|
||
import androidx.room.migration.Migration | ||
import androidx.sqlite.db.SupportSQLiteDatabase | ||
|
||
class Migration1To2 : Migration(1, 2) { | ||
|
||
override fun migrate(database: SupportSQLiteDatabase) { | ||
database.execSQL("DROP TABLE `route`") | ||
database.execSQL( | ||
"CREATE TABLE IF NOT EXISTS `route`" + | ||
" (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL," + | ||
" `city_id` INTEGER NOT NULL," + | ||
" `transport_id` INTEGER NOT NULL," + | ||
" `kindRoute_id` INTEGER NOT NULL," + | ||
" `route_number` TEXT NOT NULL," + | ||
" `route_title` TEXT NOT NULL," + | ||
" `description` TEXT NOT NULL," + | ||
" `fare` TEXT NOT NULL," + | ||
" `weekly_traffic` TEXT NOT NULL," + | ||
" `working_hours` TEXT NOT NULL," + | ||
" `following` TEXT NOT NULL," + | ||
" `carrier_company` TEXT NOT NULL," + | ||
" `tech_info` TEXT NOT NULL," + | ||
" `cash` INTEGER NOT NULL," + | ||
" `qr_code` INTEGER NOT NULL," + | ||
" `is_small` INTEGER NOT NULL," + | ||
" `is_big` INTEGER NOT NULL," + | ||
" `is_very_big` INTEGER NOT NULL," + | ||
" `eco` INTEGER NOT NULL," + | ||
" `wifi` INTEGER NOT NULL," + | ||
" `low_floor` INTEGER NOT NULL)" | ||
) | ||
database.execSQL("DROP TABLE `stop`") | ||
database.execSQL( | ||
"CREATE TABLE IF NOT EXISTS `stop`" + | ||
" (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL," + | ||
" `city_id` INTEGER NOT NULL," + | ||
" `transport_id` INTEGER NOT NULL," + | ||
" `kindRoute_id` INTEGER NOT NULL," + | ||
" `name` TEXT NOT NULL," + | ||
" `direction` TEXT NOT NULL," + | ||
" `latitude` TEXT NOT NULL," + | ||
" `longitude` TEXT NOT NULL)" | ||
) | ||
database.execSQL("DROP TABLE `routeStops`") | ||
database.execSQL( | ||
"CREATE TABLE IF NOT EXISTS `routeStops`" + | ||
" (`_id` INTEGER NOT NULL," + | ||
" `route_id` INTEGER NOT NULL," + | ||
" `stop_id` INTEGER NOT NULL," + | ||
" `shift_hour` INTEGER NOT NULL," + | ||
" `shift_minute` INTEGER NOT NULL," + | ||
" PRIMARY KEY(`_id`))" | ||
) | ||
database.execSQL("DROP TABLE `city`") | ||
database.execSQL( | ||
"CREATE TABLE IF NOT EXISTS `city`" + | ||
" (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL," + | ||
" `cityName` TEXT NOT NULL," + | ||
" `latitude` TEXT NOT NULL," + | ||
" `longitude` TEXT NOT NULL)" | ||
) | ||
database.execSQL("DROP TABLE `schedule`") | ||
database.execSQL( | ||
"CREATE TABLE IF NOT EXISTS `schedule`" + | ||
" (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL," + | ||
" `route_id` INTEGER NOT NULL," + | ||
" `type_day` INTEGER NOT NULL," + | ||
" `hour` INTEGER NOT NULL," + | ||
" `minute` INTEGER NOT NULL)" | ||
) | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<vector android:height="24dp" android:tint="?attr/colorControlNormal" | ||
android:viewportHeight="24" android:viewportWidth="24" | ||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillColor="#FF000000" android:pathData="M20 13.09V7C20 4.79 16.42 3 12 3S4 4.79 4 7V17C4 19.21 7.59 21 12 21C12.46 21 12.9 21 13.33 20.94C13.12 20.33 13 19.68 13 19L13 18.95C12.68 19 12.35 19 12 19C8.13 19 6 17.5 6 17V14.77C7.61 15.55 9.72 16 12 16C12.65 16 13.27 15.96 13.88 15.89C14.93 14.16 16.83 13 19 13C19.34 13 19.67 13.04 20 13.09M18 12.45C16.7 13.4 14.42 14 12 14S7.3 13.4 6 12.45V9.64C7.47 10.47 9.61 11 12 11S16.53 10.47 18 9.64V12.45M12 9C8.13 9 6 7.5 6 7S8.13 5 12 5 18 6.5 18 7 15.87 9 12 9M22 18H20V22H18V18H16L19 15L22 18Z"/> | ||
</vector> |