chartManD commited on
Commit
a9806e6
·
1 Parent(s): 7d73dc4

Make migrations

Browse files
Dockerfile CHANGED
@@ -1,13 +1,11 @@
1
  FROM debian:12.10
2
 
3
- RUN apt -y update
4
  # RUN /bin/bash -c "$(curl -fsSL https://php.new/install/linux/8.4)"
5
- RUN apt-get install nodejs npm
6
 
7
- RUN node --version
8
- RUN npm --version
9
-
10
- COPY site/ site/
11
 
12
  # WORKDIR npm install
13
 
 
1
  FROM debian:12.10
2
 
3
+ # RUN apt -y update
4
  # RUN /bin/bash -c "$(curl -fsSL https://php.new/install/linux/8.4)"
5
+ # RUN apt-get install nodejs npm
6
 
7
+ # RUN node --version
8
+ # RUN npm --version
 
 
9
 
10
  # WORKDIR npm install
11
 
site/database/migrations/2025_05_20_224522_create_vendedor_table.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ use Illuminate\Database\Migrations\Migration;
4
+ use Illuminate\Database\Schema\Blueprint;
5
+ use Illuminate\Support\Facades\Schema;
6
+
7
+ return new class extends Migration
8
+ {
9
+ /**
10
+ * Run the migrations.
11
+ */
12
+ public function up(): void
13
+ {
14
+ Schema::create('table_vendedor', function (Blueprint $table) {
15
+ $table->id();
16
+ $table->string("nombre");
17
+ $table->string("direccion");
18
+ $table->string("telefono");
19
+ $table->string("observacion");
20
+ $table->timestamps();
21
+ });
22
+ }
23
+
24
+ /**
25
+ * Reverse the migrations.
26
+ */
27
+ public function down(): void
28
+ {
29
+ Schema::dropIfExists('table_vendedor');
30
+ }
31
+ };
site/database/migrations/2025_05_20_225252_create_cliente_table.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ use Illuminate\Database\Migrations\Migration;
4
+ use Illuminate\Database\Schema\Blueprint;
5
+ use Illuminate\Support\Facades\Schema;
6
+
7
+ return new class extends Migration
8
+ {
9
+ /**
10
+ * Run the migrations.
11
+ */
12
+ public function up(): void
13
+ {
14
+ Schema::create('table_cliente', function (Blueprint $table) {
15
+ $table->id();
16
+ $table->string("docuemeto");
17
+ $table->string("nombre");
18
+ $table->date("fechanacimiento");
19
+ $table->string("lugarnacimiento");
20
+ $table->timestamps();
21
+ });
22
+ }
23
+
24
+ /**
25
+ * Reverse the migrations.
26
+ */
27
+ public function down(): void
28
+ {
29
+ Schema::dropIfExists('table_cliente');
30
+ }
31
+ };
site/database/migrations/2025_05_20_225506_create_tipo_table.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ use Illuminate\Database\Migrations\Migration;
4
+ use Illuminate\Database\Schema\Blueprint;
5
+ use Illuminate\Support\Facades\Schema;
6
+
7
+ return new class extends Migration
8
+ {
9
+ /**
10
+ * Run the migrations.
11
+ */
12
+ public function up(): void
13
+ {
14
+ Schema::create('table_tipo', function (Blueprint $table) {
15
+ $table->id();
16
+ $table->string("layault");
17
+ $table->timestamps();
18
+ });
19
+ }
20
+
21
+ /**
22
+ * Reverse the migrations.
23
+ */
24
+ public function down(): void
25
+ {
26
+ Schema::dropIfExists('table_tipo');
27
+ }
28
+ };
site/database/migrations/2025_05_20_230143_create_table_habitacion.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ use Illuminate\Database\Migrations\Migration;
4
+ use Illuminate\Database\Schema\Blueprint;
5
+ use Illuminate\Support\Facades\Schema;
6
+
7
+ return new class extends Migration
8
+ {
9
+ /**
10
+ * Run the migrations.
11
+ */
12
+ public function up(): void
13
+ {
14
+ Schema::create('table_habitacion', function (Blueprint $table) {
15
+ $table->id();
16
+ $table->integer("numero");
17
+ $table->integer("numeroCamas");
18
+ $table->text("descripcion");
19
+ $table->unsignedBigInteger('tipoid');
20
+ $table->timestamps();
21
+
22
+ $table->foreign("tipoid")->references("id")->on("table_tipo")->onDelete("cascade")->onUpdate("cascade");
23
+ });
24
+ }
25
+
26
+ /**
27
+ * Reverse the migrations.
28
+ */
29
+ public function down(): void
30
+ {
31
+ Schema::dropIfExists('table_habitacion');
32
+ }
33
+ };
site/database/migrations/2025_05_20_231357_create_table_talquiler.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ use Illuminate\Database\Migrations\Migration;
4
+ use Illuminate\Database\Schema\Blueprint;
5
+ use Illuminate\Support\Facades\Schema;
6
+
7
+ return new class extends Migration {
8
+ /**
9
+ * Run the migrations.
10
+ */
11
+ public function up() : void
12
+ {
13
+ Schema::create('table_talquiler', function (Blueprint $table) {
14
+ $table->id();
15
+ $table->double("precio");
16
+ $table->date("fechaEntrada");
17
+ $table->date("fechaSalida");
18
+ $table->text("observacion");
19
+ $table->unsignedBigInteger("vendedorId");
20
+ $table->unsignedBigInteger("clienteId");
21
+ $table->unsignedBigInteger("habitacionId");
22
+ $table->timestamps();
23
+
24
+ $table->foreign("vendedorId")->references("id")->on("table_vendedor")->onDelete("cascade")->onUpdate("cascade");
25
+
26
+ $table->foreign("clienteId")->references("id")->on("table_cliente")->onDelete("cascade")->onUpdate("cascade");
27
+
28
+ $table->foreign("habitacionId")->references("id")->on("table_habitacion")->onDelete("cascade")->onUpdate("cascade");
29
+ });
30
+ }
31
+
32
+ /**
33
+ * Reverse the migrations.
34
+ */
35
+ public function down() : void
36
+ {
37
+ Schema::dropIfExists('table_talquiler');
38
+ }
39
+ };
site/database/migrations/2025_05_21_141347_rename_table.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ use Illuminate\Database\Migrations\Migration;
4
+ use Illuminate\Database\Schema\Blueprint;
5
+ use Illuminate\Support\Facades\Schema;
6
+
7
+ return new class extends Migration
8
+ {
9
+ /**
10
+ * Run the migrations.
11
+ */
12
+ public function up(): void
13
+ {
14
+ Schema::rename('table_vendedor','site_vendedor');
15
+ }
16
+
17
+ /**
18
+ * Reverse the migrations.
19
+ */
20
+ public function down(): void
21
+ {
22
+ Schema::table('table_vendedor', function (Blueprint $table) {
23
+ //
24
+ });
25
+ }
26
+ };
site/database/migrations/2025_05_21_142226_rename_table.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ use Illuminate\Database\Migrations\Migration;
4
+ use Illuminate\Database\Schema\Blueprint;
5
+ use Illuminate\Support\Facades\Schema;
6
+
7
+ return new class extends Migration
8
+ {
9
+ /**
10
+ * Run the migrations.
11
+ */
12
+ public function up(): void
13
+ {
14
+ Schema::rename('table_vendedor', "site_vendedor");
15
+ }
16
+
17
+ /**
18
+ * Reverse the migrations.
19
+ */
20
+ public function down(): void
21
+ {
22
+ Schema::rename('table_vendedor', "site_vendedor");
23
+ }
24
+ };
site/database/migrations/2025_05_21_142437_rename_table.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ use Illuminate\Database\Migrations\Migration;
4
+ use Illuminate\Database\Schema\Blueprint;
5
+ use Illuminate\Support\Facades\Schema;
6
+
7
+ return new class extends Migration
8
+ {
9
+ /**
10
+ * Run the migrations.
11
+ */
12
+ public function up(): void
13
+ {
14
+ Schema::rename('table_vendedor', "site_vendedor");
15
+ }
16
+
17
+ /**
18
+ * Reverse the migrations.
19
+ */
20
+ public function down(): void
21
+ {
22
+ Schema::rename('table_vendedor', "site_vendedor");
23
+ }
24
+ };
site/database/migrations/2025_05_21_143128_update_rename_all_tables.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ use Illuminate\Database\Migrations\Migration;
4
+ use Illuminate\Database\Schema\Blueprint;
5
+ use Illuminate\Support\Facades\Schema;
6
+
7
+ return new class extends Migration {
8
+ /**
9
+ * Run the migrations.
10
+ */
11
+ public function up() : void
12
+ {
13
+ Schema::rename("table_cliente", "site_cliente");
14
+ Schema::rename("table_habitacion", "site_habitacion");
15
+ Schema::rename("table_talquiler", "site_talquiler");
16
+ Schema::rename("table_tipo", "site_tipo");
17
+ }
18
+
19
+ /**
20
+ * Reverse the migrations.
21
+ */
22
+ public function down() : void
23
+ {
24
+ Schema::rename("site_cliente", "table_cliente");
25
+ Schema::rename("site_habitacion", "table_habitacion");
26
+ Schema::rename("site_talquiler", "table_talquiler");
27
+ Schema::rename("site_tipo", "table_tipo");
28
+ }
29
+ };
site/database/migrations/2025_06_03_165228_update_column_cliente.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ use Illuminate\Database\Migrations\Migration;
4
+ use Illuminate\Database\Schema\Blueprint;
5
+ use Illuminate\Support\Facades\Schema;
6
+
7
+ return new class extends Migration {
8
+ /**
9
+ * Run the migrations.
10
+ */
11
+ public function up() : void
12
+ {
13
+ Schema::table('site_cliente', function (Blueprint $table) {
14
+ $table->renameColumn('docuemeto', 'documento');
15
+ });
16
+ }
17
+
18
+ /**
19
+ * Reverse the migrations.
20
+ */
21
+ public function down() : void
22
+ {
23
+ Schema::table('site_cliente', function (Blueprint $table) {
24
+ $table->renameColumn('documento', 'docuemeto');
25
+ });
26
+ }
27
+ };
site/database/seeders/ClientesSeeder.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Database\Seeders;
4
+
5
+ use Illuminate\Support\Facades\DB;
6
+ use Illuminate\Database\Console\Seeds\WithoutModelEvents;
7
+ use Illuminate\Database\Seeder;
8
+
9
+ class ClientesSeeder extends Seeder
10
+ {
11
+ /**
12
+ * Run the database seeds.
13
+ */
14
+ public function run(): void
15
+ {
16
+ DB::table('site_cliente')->insert([
17
+ 'docuemeto' => 'INE',
18
+ 'nombre' => 'Norberto',
19
+ 'fechanacimiento' => '2001-03-21',
20
+ 'lugarnacimiento' => 'Cosolopa'
21
+ ]);
22
+ }
23
+ }
site/database/seeders/DatabaseSeeder.php CHANGED
@@ -15,9 +15,11 @@ public function run(): void
15
  {
16
  // User::factory(10)->create();
17
 
18
- User::factory()->create([
19
- 'name' => 'Test User',
20
- 'email' => 'test@example.com',
21
- ]);
 
 
22
  }
23
  }
 
15
  {
16
  // User::factory(10)->create();
17
 
18
+ // User::factory()->create([
19
+ // 'name' => 'Test User',
20
+ // 'email' => 'test@example.com',
21
+ // ]);
22
+
23
+ $this->call(ClientesSeeder::class);
24
  }
25
  }
site/database/seeders/TipoSeeder.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Database\Seeders;
4
+
5
+ use Illuminate\Database\Console\Seeds\WithoutModelEvents;
6
+ use Illuminate\Database\Seeder;
7
+
8
+ class TipoSeeder extends Seeder
9
+ {
10
+ /**
11
+ * Run the database seeds.
12
+ */
13
+ public function run(): void
14
+ {
15
+ //
16
+ }
17
+ }
site/database/seeders/VendedorSeeder.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Database\Seeders;
4
+
5
+ use Illuminate\Database\Console\Seeds\WithoutModelEvents;
6
+ use Illuminate\Database\Seeder;
7
+ use Illuminate\Support\Facades\DB;
8
+
9
+ class VendedorSeeder extends Seeder
10
+ {
11
+ /**
12
+ * Run the database seeds.
13
+ */
14
+ public function run(): void
15
+ {
16
+ Db::table("site_vendedor") ->insert([
17
+ 'nombre' => 'Mamut',
18
+ 'direccion' => 'Calle',
19
+ 'telefono' => '',
20
+ 'observacion' => '',
21
+ ])
22
+ }
23
+ }
site/resources/views/taller.blade.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <meta name="description"
8
+ content="Esta es la primera vista que se hizo en el taller de apps con laraver... despues de 5 horas de instalcion">
9
+ <title>Campti</title>
10
+ <style>
11
+ * {
12
+ box-sizing: content-box;
13
+ margin: 0;
14
+ padding: 0;
15
+ }
16
+
17
+ body {
18
+ width: 100vw;
19
+ height: 100vh;
20
+ display: flex;
21
+ align-items: center;
22
+ justify-content: center;
23
+ background-color: #ffdd00;
24
+ }
25
+
26
+ main {
27
+ background-color: aquamarine;
28
+ }
29
+ </style>
30
+ </head>
31
+
32
+ <body>
33
+ <main>
34
+ <h1>Orale mano, ya estas aqui</h1>
35
+ <img src="https://i.pinimg.com/474x/e7/10/5f/e7105f95f681e0b4105868b573dd500d.jpg" alt="perrito blanco meme">
36
+ <img src="https://tr.rbxcdn.com/180DAY-e6e1e10779b0f5ec47f9e782b01fa5c9/420/420/Hat/Webp/noFilter"
37
+ alt="perrito blanco meme">
38
+ </main>
39
+ </body>
40
+
41
+ </html>
site/resources/views/welcome.blade.php CHANGED
The diff for this file is too large to render. See raw diff
 
site/routes/web.php CHANGED
@@ -5,3 +5,7 @@
5
  Route::get('/', function () {
6
  return view('welcome');
7
  });
 
 
 
 
 
5
  Route::get('/', function () {
6
  return view('welcome');
7
  });
8
+
9
+ Route::get('/taller', function () {
10
+ return view('taller');
11
+ });