Skip to content

Commit cf52976

Browse files
frankslinclaude
andcommitted
移除 CbdbApiPersonTest 中的 View_Address 視圖
CbdbApiController 已改用 ADDRESSES 表,測試中不再需要建立 View_Address 視圖。 變更內容: - 刪除 setUp() 中建立 View_Address 視圖的程式碼 - 刪除 tearDown() 中刪除視圖的語句 - 測試直接使用 ADDRESSES 表 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 1d470f9 commit cf52976

1 file changed

Lines changed: 0 additions & 41 deletions

File tree

tests/Feature/CbdbApiPersonTest.php

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -145,46 +145,6 @@ protected function setUp(): void
145145
$table->integer('c_lastyear')->nullable();
146146
});
147147

148-
\DB::statement(<<<'SQL'
149-
CREATE VIEW View_Address AS
150-
SELECT
151-
c_addr_id,
152-
NULL AS c_name,
153-
c_name_chn,
154-
NULL AS c_admin_type,
155-
NULL AS x_coord,
156-
NULL AS y_coord,
157-
c_firstyear,
158-
NULL AS c_lastyear,
159-
belongs1_Id,
160-
belongs1_Name,
161-
NULL AS belongs1_Type,
162-
NULL AS belongs1_FirstYear,
163-
NULL AS belongs1_LastYear,
164-
belongs2_Id,
165-
belongs2_Name,
166-
NULL AS belongs2_Type,
167-
NULL AS belongs2_FirstYear,
168-
NULL AS belongs2_LastYear,
169-
belongs3_Id,
170-
belongs3_Name,
171-
NULL AS belongs3_Type,
172-
NULL AS belongs3_FirstYear,
173-
NULL AS belongs3_LastYear,
174-
belongs4_Id,
175-
belongs4_Name,
176-
NULL AS belongs4_Type,
177-
NULL AS belongs4_FirstYear,
178-
NULL AS belongs4_LastYear,
179-
belongs5_Id,
180-
belongs5_Name,
181-
NULL AS belongs5_Type,
182-
NULL AS belongs5_FirstYear,
183-
NULL AS belongs5_LastYear
184-
FROM ADDRESSES
185-
SQL
186-
);
187-
188148
Schema::create('ENTRY_TYPES', function (Blueprint $table) {
189149
$table->integer('c_entry_type')->primary();
190150
$table->string('c_entry_type_desc_chn')->nullable();
@@ -331,7 +291,6 @@ protected function tearDown(): void
331291
Schema::dropIfExists('ENTRY_CODE_TYPE_REL');
332292
Schema::dropIfExists('ENTRY_CODES');
333293
Schema::dropIfExists('ENTRY_TYPES');
334-
\DB::statement('DROP VIEW IF EXISTS View_Address');
335294
Schema::dropIfExists('ADDRESSES');
336295
Schema::dropIfExists('BIOG_ADDR_DATA');
337296
Schema::dropIfExists('BIOG_ADDR_CODES');

0 commit comments

Comments
 (0)